Summary
A critical SQL injection vulnerability in Budibase's MySQL integration may allow attacker-controlled input to alter the SQL query executed by the application. Where multiple SQL statements are enabled and input is not safely parameterized, an attacker could execute unauthorized database commands and compromise stored data.
Affected context
The issue occurs in Budibase deployments using the MySQL integration with multiple-statement execution enabled. Risk increases where user-controlled values are incorporated into SQL queries without parameterization, strict validation, or effective separation between query structure and data.
Exploit preconditions
- Attack surface: Budibase application fields or workflows that pass user-controlled values to the MySQL integration
- Required access: The ability to submit or influence an input processed by a vulnerable database operation
- Trigger point: Execution of a query containing attacker-controlled input while multiple statements are permitted
- Why exploitation is possible: Unsafely constructed SQL can interpret input as query syntax, and multi-statement support may allow additional database commands to execute
Why this happens
The vulnerability results from combining SQL query construction with untrusted input while permitting multiple statements in a single database request. This insecure pattern can allow input to escape its intended data context and introduce additional SQL syntax, mapping to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection).
Potential impact
- An attacker could read unauthorized database records
- Sensitive data could be modified, deleted, or corrupted
- Additional SQL statements may be executed against the connected database
- Database credentials or application secrets could be exposed
- The application and dependent services could experience disruption
- Compromise could spread through overly privileged database accounts
General mitigation guidance
Mitigation generally focuses on ensuring that database input remains data rather than executable query syntax.
Common defensive patterns include:
- Use parameterized queries or prepared statements for all user-influenced values
- Disable multi-statement execution unless a narrowly justified, controlled use case requires it
- Apply strict allowlist validation to inputs that represent identifiers, sort options, or other query structure
- Separate query construction from data binding and avoid string concatenation for SQL values
- Restrict database accounts to the minimum required permissions
- Use read-only credentials for read-only workflows and isolate sensitive databases
- Handle database errors without exposing query details or credentials
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis patterns identifying SQL string concatenation, interpolation, or dynamic query construction
- Code review checks for database calls that receive raw form, API, or workflow input
- Configuration reviews that flag enabled multi-statement execution
- Application and database logs showing unexpected statement sequences, syntax anomalies, or access to unrelated tables
- Dynamic testing with benign input mutation and query-behavior monitoring in non-production environments
- Policy enforcement requiring parameterized database access and least-privilege credentials
Automated code review and application security tools may help identify unsafe query construction, but findings should be validated against the actual data flow.

