llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · mariadb

GHSA-PQCC-F7JJ-MC82

SQL injection in string parameter and escape() escaping under big5, gbk, sjis and cp932 client charsets

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-PQCC-F7JJ-MC82 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
String parameters of the text protocol and Connection.escape() escaped the JavaScript string before encoding it, on the assumption that the escape characters are below 0x80 and therefore safe under any charset. That holds only if the encoder produces byte sequences the server reads the same way. iconv-lite's big5 is Big5-HKSCS, so ordinary characters encode to two-byte sequences the server does not recognise as big5, with 0x5C as their second byte: U+56ED encodes to FB 5C, U+6A9D to FD 5C, U+011A to 88 5C. The escape inserted after such a character landed right after a byte the server reads alone, the server took the 0x5C as an escape introducer, and a following quote ended the string literal.

Under big5, 22 BMP code points inject this way, 20 of them with a lead byte below 0xA1 that no correction of the lead byte range can reach. The trigger is an ordinary character in a text field, not a crafted byte string.

The text protocol is affected for string parameters, and Connection.escape() and Pool.escape() with a string argument, when the session charset is big5, gbk, sjis or cp932. execute() and batch() are not affected.

### Impact
An attacker controlling a string parameter of a text-protocol query, or a value passed to escape(), on a connection using one of these client charsets, 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 one of these non-default client charsets, set through the charset or collation option, a connection string, or SET NAMES.

### Resolution
Under these charsets, strings are now encoded first and escaped byte-wise with the charset recognizer, as Buffer parameters are, and escape() uses the same escaping as the parameter path, so both produce the same bytes.

### 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-380: https://jira.mariadb.org/browse/CONJS-380
Fix commit: https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/b66ff8a

### 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-pqcc-f7jj-mc82

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