CVE-2026-64657
Budibase: Database Connector SQL Injections in PostgreSQL, MS SQL, and MySQL
Budibase is an open-source low-code platform. Prior to 3.39.19, the PostgreSQL datasource connector in packages/server/src/integrations/postgres.ts interpolates the user-controlled schema configuration field into a SET search_path statement without escaping embedded double quotes, allowing an authenticated administrator who saves or tests the datasource to execute arbitrary SQL through the simple query protocol. This issue is fixed in version 3.39.19.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- High
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.4
Budibase: Database Connector SQL Injections in PostgreSQL, MS SQL, and MySQL
Budibase is an open-source low-code platform. Prior to 3.39.19, the PostgreSQL datasource connector in packages/server/src/integrations/postgres.ts interpolates the user-controlled schema configuration field into a SET search_path statement without escaping embedded double quotes, allowing an authenticated administrator who saves or tests the datasource to execute arbitrary SQL through the simple query protocol. This issue is fixed in version 3.39.19.
- Record
CVE-2026-64657- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
EUVDEUVD-2026-60379
8.4
Budibase is an open-source low-code platform. Prior to 3.39.19, the PostgreSQL datasource connector in packages/server/src/integrations/postgres.ts interpolates the user-controlled schema configuration field into a SET search_path statement without escaping embedded double quotes, allowing an authenticated administrator who saves or tests the datasource to execute arbitrary SQL through the simple query protocol. This issue is fixed in version 3.39.19.
- Record
EUVD-2026-60379- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-qqf5-x7mj-v43p
8.4
budibase: Database Connector SQL Injections in PostgreSQL, MS SQL, and MySQL
Summary
This advisory covers three distinct SQL Injection vulnerabilities within Budibase's database connectors (PostgreSQL, Microsoft SQL Server, and MySQL). Because user-controlled schema and table configurations are interpolated directly into raw SQL queries without proper escaping or parameterization during database introspection, an authenticated administrator can break out of string delimiters. This allows for arbitrary DDL/DML execution, database compromise, and potential underlying OS command execution (e.g., via MS SQL xp_cmdshell).
Details
Vulnerability Type & Title
PostgreSQL SET search_path SQL Injection
Description & Root Cause
The schema datasource config field is interpolated directly into a raw SQL statement without proper escaping. Double quotes inside the schema name are not escaped, allowing an attacker to break out of the string literal and inject arbitrary SQL.
Vulnerable Code:
File: packages/server/src/integrations/postgres.ts, lines 355–358
const search_path = this.config.schema
.split(",")
.map(item => `"${item.trim()}"`) // NO escaping of embedded "
await this.client.query(`SET search_path TO ${search_path.join(",")};`)
node-postgres sends this via the simple query protocol, which supports multi-statement execution with semicolons.
Step-by-Step Reproduction
- Edit a PostgreSQL datasource configuration.
- Set the schema field to:
public"; CREATE TABLE pwned AS SELECT usename, passwd FROM pg_shadow; -- - Save or trigger a connection test.
- The query executes as:
SET search_path TO "public"; CREATE TABLE pwned AS SELECT usename, passwd FROM pg_shadow; --; - PostgreSQL executes both statements.
Impact
- Full database compromise. The attacker can read
pg_shadowhashes, callpg_read_file(), or execute any DDL/DML.
Vulnerability Type & Title
Microsoft SQL Server Schema Introspection SQL Injection
Description & Root Cause
Three methods used during schema introspection (buildSchema) interpolate user-controlled values directly into SQL strings using single-quote delimiters with no escaping.
Vulnerable Code:
File: packages/server/src/integrations/microsoftSqlServer.ts, lines 388–414
getDefinitionSQL(tableName: string, schemaName: string) {
return `select * from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME='${tableName}' AND TABLE_SCHEMA='${schemaName}'`
}
schemaName comes directly from this.config.schema (user config).
Step-by-Step Reproduction
- Edit an MS SQL Server datasource configuration.
- Set the schema field to:
dbo'; EXEC xp_cmdshell('whoami'); -- - Trigger schema introspection (fetch tables).
- The OS command executes on the SQL server if
xp_cmdshellis enabled.
Impact
- Arbitrary SQL execution, potentially leading to OS command execution via
xp_cmdshell.
Vulnerability Type & Title
MySQL multipleStatements: true + DESCRIBE Backtick Injection
Description & Root Cause
The MySQL integration enables multipleStatements: true, allowing semicolon-separated multi-statement execution. When introspecting tables, table names are interpolated into a DESCRIBE query wrapped in backticks, but the backticks are not escaped.
Vulnerable Code:
File: packages/server/src/integrations/mysql.ts, lines 172, 305
this.config = { ...config, multipleStatements: true, ... } // line 172
...
{ sql: `DESCRIBE \`${tableName}\`;` } // line 305 — backtick NOT escaped
Step-by-Step Reproduction
- An attacker (or malicious database user) creates a table named
foo`; DROP TABLE users; --. - In Budibase, an admin triggers schema introspection for the database.
- Budibase reads the malicious table name from
INFORMATION_SCHEMA.TABLESand inserts it into theDESCRIBEquery. - The backtick breaks out, and the secondary
DROP TABLEpayload executes.
Impact
-…
- Record
GHSA-qqf5-x7mj-v43p- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
NVD
8.4
Budibase is an open-source low-code platform. Prior to 3.39.19, the PostgreSQL datasource connector in packages/server/src/integrations/postgres.ts interpolates the user-controlled schema configuration field into a SET search_path statement without escaping embedded double quotes, allowing an authenticated administrator who saves or tests the datasource to execute arbitrary SQL through the simple query protocol. This issue is fixed in version 3.39.19.
- Record
CVE-2026-64657- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSV
8.4
Budibase: Database Connector SQL Injections in PostgreSQL, MS SQL, and MySQL
Budibase is an open-source low-code platform. Prior to 3.39.19, the PostgreSQL datasource connector in packages/server/src/integrations/postgres.ts interpolates the user-controlled schema configuration field into a SET search_path statement without escaping embedded double quotes, allowing an authenticated administrator who saves or tests the datasource to execute arbitrary SQL through the simple query protocol. This issue is fixed in version 3.39.19.
- Record
CVE-2026-64657- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVGHSA-qqf5-x7mj-v43p
8.4
budibase: Database Connector SQL Injections in PostgreSQL, MS SQL, and MySQL
Summary
This advisory covers three distinct SQL Injection vulnerabilities within Budibase's database connectors (PostgreSQL, Microsoft SQL Server, and MySQL). Because user-controlled schema and table configurations are interpolated directly into raw SQL queries without proper escaping or parameterization during database introspection, an authenticated administrator can break out of string delimiters. This allows for arbitrary DDL/DML execution, database compromise, and potential underlying OS command execution (e.g., via MS SQL xp_cmdshell).
Details
Vulnerability Type & Title
PostgreSQL SET search_path SQL Injection
Description & Root Cause
The schema datasource config field is interpolated directly into a raw SQL statement without proper escaping. Double quotes inside the schema name are not escaped, allowing an attacker to break out of the string literal and inject arbitrary SQL.
Vulnerable Code:
File: packages/server/src/integrations/postgres.ts, lines 355–358
const search_path = this.config.schema
.split(",")
.map(item => `"${item.trim()}"`) // NO escaping of embedded "
await this.client.query(`SET search_path TO ${search_path.join(",")};`)
node-postgres sends this via the simple query protocol, which supports multi-statement execution with semicolons.
Step-by-Step Reproduction
- Edit a PostgreSQL datasource configuration.
- Set the schema field to:
public"; CREATE TABLE pwned AS SELECT usename, passwd FROM pg_shadow; -- - Save or trigger a connection test.
- The query executes as:
SET search_path TO "public"; CREATE TABLE pwned AS SELECT usename, passwd FROM pg_shadow; --; - PostgreSQL executes both statements.
Impact
- Full database compromise. The attacker can read
pg_shadowhashes, callpg_read_file(), or execute any DDL/DML.
Vulnerability Type & Title
Microsoft SQL Server Schema Introspection SQL Injection
Description & Root Cause
Three methods used during schema introspection (buildSchema) interpolate user-controlled values directly into SQL strings using single-quote delimiters with no escaping.
Vulnerable Code:
File: packages/server/src/integrations/microsoftSqlServer.ts, lines 388–414
getDefinitionSQL(tableName: string, schemaName: string) {
return `select * from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME='${tableName}' AND TABLE_SCHEMA='${schemaName}'`
}
schemaName comes directly from this.config.schema (user config).
Step-by-Step Reproduction
- Edit an MS SQL Server datasource configuration.
- Set the schema field to:
dbo'; EXEC xp_cmdshell('whoami'); -- - Trigger schema introspection (fetch tables).
- The OS command executes on the SQL server if
xp_cmdshellis enabled.
Impact
- Arbitrary SQL execution, potentially leading to OS command execution via
xp_cmdshell.
Vulnerability Type & Title
MySQL multipleStatements: true + DESCRIBE Backtick Injection
Description & Root Cause
The MySQL integration enables multipleStatements: true, allowing semicolon-separated multi-statement execution. When introspecting tables, table names are interpolated into a DESCRIBE query wrapped in backticks, but the backticks are not escaped.
Vulnerable Code:
File: packages/server/src/integrations/mysql.ts, lines 172, 305
this.config = { ...config, multipleStatements: true, ... } // line 172
...
{ sql: `DESCRIBE \`${tableName}\`;` } // line 305 — backtick NOT escaped
Step-by-Step Reproduction
- An attacker (or malicious database user) creates a table named
foo`; DROP TABLE users; --. - In Budibase, an admin triggers schema introspection for the database.
- Budibase reads the malicious table name from
INFORMATION_SCHEMA.TABLESand inserts it into theDESCRIBEquery. - The backtick breaks out, and the secondary
DROP TABLEpayload executes.
Impact
-…
- Record
GHSA-qqf5-x7mj-v43p- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
budibasenpm |
before 3.39.19 | 3.39.19 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-64657 is a high vulnerability (CVSS 8.4) in Budibase, published June 18, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.45%, the 39th percentile. Fixed in budibase 3.39.19.
References
github.com/Budibase/budibase/security/advisories/GHSA-qqf5-x7mj-v43p
github.com/Budibase/budibase/commit/67572a82c3850964f388bfd969779dc025a80224
github.com/advisories/GHSA-qqf5-x7mj-v43p
github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64657.json
nvd.nist.gov/vuln/detail/CVE-2026-64657
github.com/Budibase/budibase
Left out here: the rest of 2 source descriptions. The JSON record has them.