Summary
MariaDB has possible SQL injection in Buffer parameter escaping under big5/gbk/sjis/cp932/gb18030 client charsets
A SQL injection is possible when the connector escapes Buffer parameters client-side under a multi-byte client character set whose trail-byte range overlaps the ASCII backslash (0x5C): big5, gbk, sjis, cp932, and gb18030. Under these charsets, an attacker-controlled lead byte can absorb the escape byte the connector inserts, leaving the following quote unescaped so it terminates the string literal and injected SQL is parsed.
Details
When binding a Buffer (binary) parameter, the connector escapes the value byte-by-byte, inserting a backslash (0x5C) before quote (0x27) and backslash bytes. This is correct under single-byte and UTF-8–family charsets, but unsafe under client charsets whose multi-byte trail-byte range includes 0x5C.
On the server, the SQL lexer performs multi-byte character recognition (my_ismbchar) before it interprets escape sequences. If character_set_client is one of the affected charsets and the attacker controls a byte the lexer treats as a valid lead byte, the sequence <0x5C> is consumed as a single multi-byte character. The escaping backslash inserted by the connector is swallowed as that character's trail byte, so the following 0x27 is no longer escaped, it closes the string literal, and the remaining bytes are parsed as SQL.
This is the well-known multi-byte escaping bypass (the same class that historically affected addslashes / mysql_real_escape_string under GBK/Big5), here applied to the connector's client-side Buffer escaping path.
Am I affected?
You are affected if all of the following hold:
You use mariadb Connector/Node.js at a version below the patched releases listed below.
The connection's client character set is one of big5, gbk, sjis, cp932, or gb18030. This is not the default (the default is utf8mb4).
Untrusted data can reach a Buffer-typed query parameter.
Applications using utf8mb4 (or any charset whose trail-byte range does not include 0x5C) are not affected by this vector. Parameters bound through the binary/server-side prepared-statement path are also not affected, because those values are sent out-of-band and are never escaped into the SQL text.
Workarounds
If you cannot upgrade immediately:
Use server-side prepared statements (execute) so parameters are bound via the binary protocol rather than escaped into the SQL text.
Avoid passing untrusted data as Buffer parameters under the affected charsets.
Credit
Reported by Yalguun Tumenkhuu (@fg0x0).
Impact
SQL injection. An attacker able to influence the contents of a Buffer parameter can break out of the intended string literal and inject arbitrary SQL, leading to unauthorized read or modification of data and, depending on the database account's privileges, further compromise.
Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access. Typical impact: data disclosure or modification.
CVE-2026-55855 has a CVSS score of 6.5 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.2.4, 3.3.4, 3.4.6, 3.5.3); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Fixed in 3.2.4, 3.3.3, 3.4.6, and 3.5.3. Upgrade to the patched release on your branch:
- 3.5.x → 3.5.3
- 3.4.x → 3.4.6
- 3.3.x → 3.3.3
- 3.2.x and earlier → 3.2.4 (or any newer release)
Frequently Asked Questions
- What is CVE-2026-55855? CVE-2026-55855 is a medium-severity SQL injection vulnerability in mariadb (npm), affecting versions < 3.2.4. It is fixed in 3.2.4, 3.3.4, 3.4.6, 3.5.3. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
- How severe is CVE-2026-55855? CVE-2026-55855 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of mariadb are affected by CVE-2026-55855? mariadb (npm) versions < 3.2.4 is affected.
- Is there a fix for CVE-2026-55855? Yes. CVE-2026-55855 is fixed in 3.2.4, 3.3.4, 3.4.6, 3.5.3. Upgrade to this version or later.
- Is CVE-2026-55855 exploitable, and should I be worried? Whether CVE-2026-55855 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-55855 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-55855?
- Upgrade
mariadbto 3.2.4 or later - Upgrade
mariadbto 3.3.4 or later - Upgrade
mariadbto 3.4.6 or later - Upgrade
mariadbto 3.5.3 or later
- Upgrade