GHSA-2xgg-r2wc-c5r2: Budibase MySQL DESCRIBE Backtick Injection Vulnerability
HIGHGHSA-2xgg-r2wc-c5r2 is a HIGH (CVSS 7.6) mysql describe backtick injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Budibase libraries in the npm ecosystem. The issue involves mysql describe backtick injection via multiplestatements in database connector. Remediation is available in the latest vendor maintenance releases.
GHSA-2xgg-r2wc-c5r2 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H).
How to Fix GHSA-2xgg-r2wc-c5r2
To remediate this vulnerability, upgrade all affected Budibase dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @budibase/server@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @budibase/server
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-2xgg-r2wc-c5r2, inspect your project dependencies using npm:
npm ls @budibase/server
Analyze the terminal output to locate any version of Budibase in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls @budibase/server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Budibase, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-2xgg-r2wc-c5r2 Affected Budibase Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@budibase/server
|
npm |
≤ 3.38.1
|
|
References
Frequently Asked Questions
What is GHSA-2xgg-r2wc-c5r2?
Which Budibase versions are affected?
What version fixes GHSA-2xgg-r2wc-c5r2?
Is @budibase/server affected?
What is the CVSS score of GHSA-2xgg-r2wc-c5r2?
What CWE is associated with GHSA-2xgg-r2wc-c5r2?
How can I check npm dependencies for GHSA-2xgg-r2wc-c5r2?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2xgg-r2wc-c5r2",
"modified" : "2026-07-24T21:26:19Z",
"published" : "2026-07-24T21:26:19Z",
"aliases" : [ ],
"summary" : "Budibase: MySQL DESCRIBE Backtick Injection via multipleStatements in Database Connector",
"details" : "### Summary\n**This is a related but independently fixable vulnerability to GHSA-qqf5-x7mj-v43p\n(PostgreSQL SQL injection), reported in the same original disclosure and\nsplit per GitHub CNA guidance (rule 4.2.11) since it affects a separate\nintegration, has a distinct attack precondition, and requires a separate\npatch.**\n\nThe MySQL integration enables `multipleStatements: true` on the connection,\npermitting semicolon-separated multi-statement execution. During table\nintrospection, table names retrieved from `INFORMATION_SCHEMA.TABLES` are\ninterpolated into a `DESCRIBE` query wrapped in backticks, but embedded\nbackticks in the table name are never escaped — allowing a malicious table\nname to break out and inject a second, attacker-controlled statement.\n\n### Details\n\n**Vulnerable Code:**\nFile: `packages/server/src/integrations/mysql.ts`, lines 172, 305\n\n```typescript\nthis.config = { ...config, multipleStatements: true, ... } // line 172\n...\n{ sql: `DESCRIBE \\`${tableName}\\`;` } // line 305 — backtick NOT escaped\n```\n\nBecause `multipleStatements` is enabled, any statement appended after the\nbacktick break-out executes as a second query in the same round trip.\n\n### Step-by-Step Reproduction\n1. An attacker with the ability to create tables in the target MySQL\n database (e.g. a lower-privileged database user, or a malicious actor in\n a multi-tenant database) creates a table named:\n ``foo`; DROP TABLE users; --``\n2. In Budibase, an administrator triggers schema introspection for that\n database (e.g. opening the datasource or refreshing its table list).\n3. Budibase reads the malicious table name from `INFORMATION_SCHEMA.TABLES`\n and interpolates it into the `DESCRIBE` query.\n4. The unescaped backtick terminates the identifier early, and the\n semicolon-separated payload (enabled by `multipleStatements: true`)\n executes as a second statement.\n\n### Impact\nArbitrary SQL execution triggered during routine schema discovery. Unlike\nthe PostgreSQL and MS SQL Server findings, this does not require the\nattacker to control the Budibase datasource configuration directly — only\nthe ability to create a maliciously named table in the underlying database\nbeforehand, with an administrator's normal use of the introspection feature\nserving as the trigger.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@budibase/server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "3.38.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/security/advisories/GHSA-2xgg-r2wc-c5r2"
}, {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/pull/18989"
}, {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/commit/2c61f389c9986c91ddd8ae161c2b5e8ec21c60ac"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Budibase/budibase"
}, {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/releases/tag/3.39.18"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-24T21:26:19Z",
"nvd_published_at" : null
}
}