MariaDB Connector/Node.js CVE-2026-55855
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSupply attacker-controlled binary data as application input
-
DeliveryApplication passes data as Buffer parameter to mariadb query() call
-
ExploitConnector inserts 0x5C escape before 0x27 quote byte
-
InstallServer SQL lexer consumes lead-byte + 0x5C as single multi-byte character
-
C2Unescaped 0x27 terminates string literal
-
ExecuteInject and execute arbitrary SQL
-
ImpactExfiltrate or modify database records
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires all three conditions to hold simultaneously: (1) the mariadb npm package version is below the patched threshold for the installed 3.x branch (below 3.2.4, 3.3.3, 3.4.6, or 3.5.3); (2) the database connection's character_set_client is explicitly set to one of big5, gbk, sjis, cp932, or gb18030 - these are non-default configurations that must be deliberately chosen by the application developer, typically for East Asian locale support; and (3) attacker-controlled data reaches a Buffer-typed query parameter on the client-side text escape path (i.e., via the query() API with parameter interpolation, not the execute() binary prepared-statement API). Deployments using the default utf8mb4 charset are fully immune to this vector. Use of the execute() binary prepared-statement path also prevents exploitation regardless of charset. The CVSS PR:N rating reflects that the attacker does not need database or application credentials - only the ability to supply input that the application passes as a Buffer query parameter. |
| Impact | The CVSS 6.5 score with vector AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N reflects the network-reachable nature of the injection while correctly marking AC:H due to the non-default character set prerequisite, which materially narrows the exploitable population. Real-world risk is concentrated in applications explicitly configured for East Asian locales - Chinese (GBK, Big5, GB18030), Japanese (Shift-JIS, CP932) - where these character sets are operationally common and the deployment footprint of the vulnerable configuration is non-trivial. The High confidentiality impact (C:H) is consistent with SQL injection enabling arbitrary SELECT queries against the database account's accessible data. Low integrity impact (I:L) reflects limited data modification rather than full schema control. There is no CISA KEV listing and no identified public POC, placing exploitation status at theoretical-but-credible given the well-known nature of the underlying technique. EPSS data was not provided in the input; risk should be assessed primarily on deployment conditions rather than probabilistic scores. The AC:H designation should not lead defenders to deprioritize this if their application uses any of the five affected charsets - those deployments face a practically exploitable SQL injection with only the application accepting attacker-influenced binary data as an additional prerequisite. |
| Exploit ScenarioDerived | An attacker submits a crafted binary payload - for example, through a file upload endpoint or a binary data field - to an application that passes the input as a Buffer parameter in a mariadb connector query operating under the GBK or Big5 character set. The payload's first byte is a valid GBK lead byte (e.g., 0x81); the connector inserts 0x5C before the following 0x27 quote byte to escape it, but the server's SQL lexer treats 0x81 + 0x5C as a single two-byte GBK character and consumes the backslash as its trail byte, leaving the 0x27 unescaped. The bare quote terminates the string literal, and the attacker's remaining bytes are parsed as SQL - for example, injecting a UNION SELECT to return sensitive rows or issuing an UPDATE to modify application data. No public POC has been identified at time of analysis, but the underlying GBK/Big5 escape bypass technique is publicly documented in security literature. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 28, 2026
SQL injection in MariaDB Connector/Node.js exposes applications to data exfiltration or modification when using non-default multi-byte character sets (big5, gbk, sjis, cp932, or gb18030) with attacker-controlled Buffer query parameters. Versions prior to 3.2.4, 3.3.3, 3.4.6, and 3.5.3 contain a charset-unaware byte-wise escape routine that allows an attacker-supplied lead byte to absorb the connector-inserted backslash (0x5C) as a multi-byte trail byte, leaving the following quote (0x27) unescaped and terminating the SQL string literal. No public exploit code has been identified at time of analysis and this CVE is not in the CISA KEV catalog, but the root technique is well-documented in public security literature as the classic GBK/Big5 multi-byte escape bypass.
RemediationAI
The primary remediation is to upgrade the mariadb npm package to a patched release: 3.2.4, 3.3.3, 3.4.6, or 3.5.3, available at the respective GitHub release tags (e.g., https://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.5.3). Where an immediate upgrade is not possible, two specific compensating controls are available. First, configure the connection to use utf8mb4 (the connector default) instead of any of the five affected multi-byte charsets - this fully prevents the bypass because utf8mb4 trail bytes never overlap 0x5C; the trade-off is potential re-encoding overhead or loss of native Big5/GBK text handling if the database stores data in those charsets. Second, switch query calls that pass Buffer parameters to the binary prepared-statement path using the execute() API rather than query() with inline interpolation - this transmits parameter values out-of-band and bypasses the vulnerable escape routine entirely; the trade-off is an API refactor and slightly different query semantics. Do not rely on input validation alone as a substitute for patching, as the bypass is a structural encoding flaw rather than an input filter gap.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability (CWE-89, SQL Injection) arises from a disconnect between how the MariaDB/MySQL server SQL lexer processes character encoding and how the connector performs client-side escaping. The server lexer calls my_ismbchar - a multi-byte character recognizer - before it interprets escape sequences. Under charsets like GBK or Big5, whose trail-byte range overlaps the ASCII backslash value 0x5C, a two-byte sequence <lead-byte><0x5C> is consumed as a single valid multi-byte character, meaning the backslash is swallowed as a trail byte and never seen as an escape prefix. The vulnerable code path is PacketOutputStream.writeBufferEscape in lib/io/packet-output-stream.js, which applied a naive byte-by-byte escaping strategy without invoking the charset-aware getMbRecognizer logic available in lib/misc/charset-mb.js. The fix, visible in commit diffs, introduces a new writeBufferEscapeMb method that copies complete multi-byte sequences verbatim and escapes lone head bytes, precisely mirroring the server lexer's own behavior. The affected CPE is cpe:2.3:a:mariadb-corporation:mariadb-connector-nodejs. The binary prepared-statement path (execute API) is entirely unaffected because parameters are transmitted out-of-band and are never encoded into the SQL text stream.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
AC:H because exploitation requires non-default charset configuration; PR:N because the attacker influences query contents through application input without needing credentials; no availability impact applies.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
MariaDB Connector/Node.js is used to connect applications developed on Node.js to MariaDB and MySQL databases. Prior to 3.2.4, 3.3.3, 3.4.6, and 3.5.3, MariaDB Connector/Node.js permits SQL injection when attacker-controlled Buffer parameters are escaped client-side under the big5, gbk, sjis, cp932, or gb18030 client character sets. PacketOutputStream.writeBufferEscape in lib/io/packet-output-stream.js escaped bytes without the charset-aware getMbRecognizer logic in lib/misc/charset-mb.js. The server SQL lexer runs my_ismbchar before escape processing, so an attacker-controlled lead byte can consume the inserted 0x5C backslash as a multibyte trail byte and leave the following 0x27 quote unescaped, terminating the string literal and allowing arbitrary SQL. The default utf8mb4 character set and parameters sent through the execute binary prepared-statement path are not affected. Successful exploitation can expose or modify data available to the database account. This issue is fixed in versions 3.2.4, 3.3.3, 3.4.6, and 3.5.3.
Blast Radius
ecosystem impact- 4 npm packages depend on mariadb (3 direct, 1 indirect)
Ecosystem-wide dependent count for version 3.3.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Affected Products (CPE)CVE.org
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic
GHSA-g5xc-5w98-jfvm
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB