Skip to main content

MariaDB Connector/Node.js CVE-2026-55855

MEDIUM
SQL Injection (CWE-89)
2026-08-28 GitHub_M GHSA-g5xc-5w98-jfvm
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Supply attacker-controlled binary data as application input
  2. Delivery
    Application passes data as Buffer parameter to mariadb query() call
  3. Exploit
    Connector inserts 0x5C escape before 0x27 quote byte
  4. Install
    Server SQL lexer consumes lead-byte + 0x5C as single multi-byte character
  5. C2
    Unescaped 0x27 terminates string literal
  6. Execute
    Inject and execute arbitrary SQL
  7. Impact
    Exfiltrate 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

npm mariadb fix: 3.2.4, 3.3.4, 3.4.6, 3.5.3

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

Vendor (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
vuln.today AI 6.5 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 4 npm packages depend on mariadb (3 direct, 1 indirect)

Ecosystem-wide dependent count for version 3.3.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
Medium
popular Node.js DB connector, but non-default charset limits exposure
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

52
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

Affected Products (CPE)CVE.org

cpe:2.3:a:mariadb-corporation:mariadb-connector-nodejs:*:*:*:*:*:*:*:*
CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2013-4660 MEDIUM POC
6.8 Jun 28

The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy