llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · mariadb

GHSA-V6PJ-GXXW-PHFW

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

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche4 versionesPrimer parche a -37 d de la divulgación
Exposición43 dDesde la divulgación, 8 oct 2026, 2:42 p. m.
Detección39 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 3.2.5 +3
Monitoreo
Detectada
1 sept 26
8 oct 26
16 oct 26
17 nov 26
21 nov 26
1 sept 26
21 sept 26
11 oct 26
31 oct 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 3.2.5 mariadb · -37 d desde divulgación
Remediación Parche 3.3.4 mariadb · -37 d desde divulgación
Remediación Parche 3.4.7 mariadb · -37 d desde divulgación
Remediación Parche 3.5.4 mariadb · -37 d desde divulgación
Divulgación Publicada GHSA-V6PJ-GXXW-PHFW divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### 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.

Versiones

Rangos afectados

Afectada Corregida Última
mariadb≥ 3.2.0 < 3.2.5
mariadb≥ 3.3.0 < 3.3.4
mariadb≥ 3.4.0 < 3.4.7
mariadb≥ 3.5.0-rc.0 < 3.5.4
3.2.0
3.2.5
3.3.0
3.3.4
3.4.0
3.4.7
3.5.0-rc.0
3.5.4
3.5.5
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmmariadb
Corregida 3.2.5, 3.3.4, 3.4.7, 3.5.4 -37 d · -37 d · -37 d · -37 d 3.5.5 no afectada
Versiones corregidas3.2.53.3.43.4.73.5.4
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs/security/advisories/GHSA-v6pj-gxxw-phfw
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/144b8f4ef29539a9fb4b75d972b9dcdac4088b4e
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/6743b2f4a89b074268b44c650170767f35e1fb5d
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/8eb450972ff0f3826d7d45c071a42240798bc826
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/b9b04ec82a60b2caf2b0c038259ca9aff5d7014a
Otrahttps://hackerone.com/reports/3889198
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.2.5
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.3.4
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.4.7
Otrahttps://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.5.4
Otrahttps://jira.mariadb.org/browse/CONJS-369

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.