llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · mariadb

GHSA-34WH-96P7-XCJQ

SQL injection when the configured client charset is not supported by the server (gb18030 on MariaDB)

Parche disponible
Descargar PNG JSON
CVSS 3.1
6.5
Media
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche4 versionesPrimer parche a -7 d de la divulgación
Exposición7 dDesde la divulgación, 12 nov 2026, 11:28 a. m.
Detección6 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 3.2.6 +3
Monitoreo
Detectada +1
5 nov 26
12 nov 26
19 nov 26
5 nov 26
9 nov 26
12 nov 26
16 nov 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 3.2.6 mariadb · -7 d desde divulgación
Remediación Parche 3.3.5 mariadb · -7 d desde divulgación
Remediación Parche 3.4.8 mariadb · -7 d desde divulgación
Remediación Parche 3.5.5 mariadb · -7 d desde divulgación
Divulgación Publicada GHSA-34WH-96P7-XCJQ divulgada · CVSS 6.5 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### Description
The connector selected its escaping from the charset the application requested, without checking which charset the server actually honoured. The collation was sent in the handshake, and the server silently ignores a collation it does not know: MariaDB implements no gb18030 charset, so a connection opened with charset gb18030 stayed on utf8mb4 while the connector escaped Buffer and stream parameters with the gb18030 recognizer. Since the gb18030 lead byte range is 0x81 to 0xFE, almost every lead byte followed by 0x5C was copied verbatim without an escape, and the server, lexing as utf8mb4, read the 0x5C as an escape introducer: 126 of the 128 possible lead bytes let a following quote end the string literal.

The same mismatch applies to any charset the server does not implement while the connector has an escaper for it.

### Impact
An attacker controlling a Buffer or stream parameter of a text-protocol query, on a connection configured with a charset the server does not support, could execute SQL inside the host statement with the privileges of the application's database user. With multipleStatements left to its default, the injection is bounded to the host statement.

Exposure requires a non-default client charset the server does not implement, set through the charset or collation option or a connection string.

### Resolution
A configured collation is always set with SET NAMES after the handshake, so a charset the server does not support is refused by the server and the connection fails, instead of the connector escaping for a charset the session does not use.

### Patches
Fixed in 3.2.6, 3.3.5, 3.4.8 and 3.5.5. Upgrade to the patched release of your branch.

### Workarounds
Use execute() or batch(), or use the default utf8mb4 client charset, until upgraded.

### References
CONJS-381: https://jira.mariadb.org/browse/CONJS-381
Fix commit: https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/13a368c

### Credit
Reported by Yalguun Tumenkhuu (@fg0x0 https://github.com/fg0x0/).

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
mariadb< 3.2.6
mariadb≥ 3.3.0 < 3.3.5
mariadb≥ 3.4.0 < 3.4.8
mariadb≥ 3.5.0-rc.0 < 3.5.5
3.2.6
3.3.0
3.3.5
3.4.0
3.4.8
3.5.0-rc.0
3.5.5
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmmariadb
Corregida 3.2.6, 3.3.5, 3.4.8, 3.5.5 -7 d · -7 d · -7 d · -7 d 3.5.5 no afectada
Versiones corregidas3.2.63.3.53.4.83.5.5
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/mariadb-corporation/mariadb-connector-nodejs/security/advisories/GHSA-34wh-96p7-xcjq

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