All vulnerabilities
CVE-2026-107384BIT-mariadb-2026-107384BIT-mariadb-min-2026-107384BIT-mysql-client-2026-107384GHSA-v6pj-gxxw-phfw

MariaDB Connector/Node.js: SQL injection through object keys in SET expansion (permitSetMultiParamEntries)

mariadb-corporation mariadbnpmDatabases
CVSS
8.1High
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.45%Chance of exploitation activity in the next 30 days, higher than 37% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in3.2.5Also 3.3.4, 3.4.7 and 1 moreGitHub
Published8 Oct 2026Updated 16 Oct 2026CVE List

What fixes it

  • 3.2.5mariadb, npmGitHubnpm install mariadb@3.2.5
  • 3.3.4mariadb, npmGitHubnpm install mariadb@3.3.4
  • 3.4.7mariadb, npmGitHubnpm install mariadb@3.4.7
  • 3.5.4mariadb, npmGitHubnpm install mariadb@3.5.4

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Description

With the non-default permitSetMultiParamEntries option enabled, an object passed as a query parameter is expanded into a SET clause, each key becoming a column name. The three code paths implementing that expansion built the backtick-quoted identifier by hand and wrote the key out unescaped, while only the value was escaped.

A key containing a backtick therefore closed the identifier, and the remainder of the key was parsed as SQL. The connector's own identifier escaper (escapeId, which correctly doubles backticks) existed but was not called from any of the three sites. This is an incomplete fix of GitHub issue #252, which corrected escapeId itself in 2023 but left these hand-built call sites unchanged.

Impact

An application that enables permitSetMultiParamEntries and passes an object with attacker-influenced keys into a statement such as conn.query('UPDATE users SET ? WHERE id = ?', [body, id]) allows the caller to write columns the application never intended to expose — a role, balance or password column — and to append arbitrary SQL to the statement, since the injected text is not confined to an assignment.

Exposure requires the option to be enabled: it is off by default, and with it off the object is serialised and escaped as a single string literal, so the key never reaches the SQL grammar. Passing a request body into this API is, however, the ordinary reason to enable the option. An application that enables it is asking for keys to become column names, not for keys to become arbitrary SQL.

Resolution

All three expansion sites now route the key through the identifier escaper, doubling backticks before writing the column name. The feature is unchanged for legitimate keys, including reserved words.

Workarounds

Disable permitSetMultiParamEntries (the default), or validate object keys against an allow-list of column names before passing them to query(), until upgraded.

Credit

Reported by fg0x0.

Text from GitHub Advisory Database

Affected versions 12

  • mariadb, npm>= 3.2.0, < 3.2.5GitHub
  • mariadb, npm>= 3.3.0, < 3.3.4GitHub
  • mariadb, npm>= 3.4.0, < 3.4.7GitHub
  • mariadb, npm>= 3.5.0-rc.0, < 3.5.4GitHub
  • mariadb-connector-nodejsaffected: >= 3.2.0, < 3.2.5CVE List
  • mariadb-connector-nodejsaffected: >= 3.3.0, < 3.3.4CVE List
  • mariadb-connector-nodejsaffected: >= 3.4.0, < 3.4.7CVE List
  • mariadb-connector-nodejsaffected: >= 3.5.0-rc.0, < 3.5.4CVE List
  • mariadb, npmfrom 3.2.0, fixed in 3.2.5OSV
  • mariadb, npmfrom 3.3.0, fixed in 3.3.4OSV
  • mariadb, npmfrom 3.4.0, fixed in 3.4.7OSV
  • mariadb, npmfrom 3.5.0-rc.0, fixed in 3.5.4OSV

References 12