Skip to content

MySQL DESCRIBE Backtick Injection via multipleStatements in Database Connector

High
mjashanks published GHSA-2xgg-r2wc-c5r2 Jul 22, 2026

Package

npm @budibase/server (npm)

Affected versions

<3.40.0

Patched versions

3.40.0

Description

Summary

This is a related but independently fixable vulnerability to GHSA-qqf5-x7mj-v43p
(PostgreSQL SQL injection), reported in the same original disclosure and
split per GitHub CNA guidance (rule 4.2.11) since it affects a separate
integration, has a distinct attack precondition, and requires a separate
patch.

The MySQL integration enables multipleStatements: true on the connection,
permitting semicolon-separated multi-statement execution. During table
introspection, table names retrieved from INFORMATION_SCHEMA.TABLES are
interpolated into a DESCRIBE query wrapped in backticks, but embedded
backticks in the table name are never escaped — allowing a malicious table
name to break out and inject a second, attacker-controlled statement.

Details

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

Because multipleStatements is enabled, any statement appended after the
backtick break-out executes as a second query in the same round trip.

Step-by-Step Reproduction

  1. An attacker with the ability to create tables in the target MySQL
    database (e.g. a lower-privileged database user, or a malicious actor in
    a multi-tenant database) creates a table named:
    foo`; DROP TABLE users; --
  2. In Budibase, an administrator triggers schema introspection for that
    database (e.g. opening the datasource or refreshing its table list).
  3. Budibase reads the malicious table name from INFORMATION_SCHEMA.TABLES
    and interpolates it into the DESCRIBE query.
  4. The unescaped backtick terminates the identifier early, and the
    semicolon-separated payload (enabled by multipleStatements: true)
    executes as a second statement.

Impact

Arbitrary SQL execution triggered during routine schema discovery. Unlike
the PostgreSQL and MS SQL Server findings, this does not require the
attacker to control the Budibase datasource configuration directly — only
the ability to create a maliciously named table in the underlying database
beforehand, with an administrator's normal use of the introspection feature
serving as the trigger.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
High
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H

CVE ID

CVE-2026-73408

Weaknesses

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

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. Learn more on MITRE.

Credits