Vulnerability · CVE-2026-107385
MariaDB Connector/Node.js: SQL injection in the text protocol when the session uses NO_BACKSLASH_ESCAPES
Published Oct 8, 2026 · catalog updated Oct 16, 2026 · MariaDB Connector/Node.js: SQL injection
Check if you run it
No confirmed exploitation is on record for CVE-2026-107385. EPSS is 0.44%. Act only if a listed version of MariaDB Connector/Node.js: SQL injection is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (MariaDB Connector/Node.js: SQL injection).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- High7.4
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.44%
- Remediation
- Advisory link
- Affected products
- npm mariadb
### Description When escaping string and binary parameters for the text protocol, the connector always escaped the quote character with a backslash, without ever consulting the session's NO_BACKSLASH_ESCAPES SQL mode. The server status flag was declared (STATUS_NO_BACKSLASH_ESCAPES) but never read. Under a server or session running with NO_BACKSLASH_ESCAPES, the backslash is an ordinary character and the quote must be escaped by doubling it. The escaped value produced by the connector therefore closed the string literal, and a value passed through a placeholder was interpreted as SQL. All text-protocol escaping entry points were affected, including Connection.escape(). ### Impact An attacker able to influence any value the application passes as a query parameter could execute arbitrary SQL with the privileges of the application's database user: read, modify or delete any data reachable by that connection. Exposure requires a deployment where NO_BACKSLASH_ESCAPES is enabled — server-wide, through the connector's sessionVariables / initSql options, or by an application-issued SET sql_mode. It is not implied by the ANSI, ORACLE or TRADITIONAL compound modes on MariaDB 11.4, so it has to be set deliberately. Where it is enabled, no unusual application code is needed: the standard placeholder API is the injection point. execute() and batch() are not affected: the binary prepared-statement and bulk protocols send parameter values out of band. ### Resolution The escaping routines now branch on the session status flag, doubling the quote and leaving the backslash untouched when NO_BACKSLASH_ESCAPES is set ### Workarounds Use execute() or batch(), or do not enable NO_BACKSLASH_ESCAPES, until upgraded. ### Credit Reported by fg0x0.
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- npm mariadb0 → 3.2.5
- npm mariadb3.3.0 → 3.3.4
- npm mariadb3.4.0 → 3.4.7
- npm mariadb3.5.0-rc.0 → 3.5.4
How to fix CVE-2026-107385
Recommended remediation
A patch or advisory reference is linked. Open the original publisher for availability by product version.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-107385. EPSS is 0.44%. Act only if a listed version of MariaDB Connector/Node.js: SQL injection is installed.
Which versions are affected?
Compare what you have installed with 0 → 3.2.5, 3.3.0 → 3.3.4, 3.4.0 → 3.4.7, 3.5.0-rc.0 → 3.5.4. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-89: SQL Injection. EPSS 0.44%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 8, 2026 · GitHub Advisory Database
Detected
### Description When escaping string and binary parameters for the text protocol, the connector always escaped the quote character with a backslash, without ever consulting the session's NO_BACKSLASH_ESCAPES SQL mode. The server status flag was declared (STATUS_NO_BACKSLASH_ESCAPES) but never read. Under a server or session running with NO_BACKSLASH_ESCAPES, the backslash is an ordinary character
Oct 16, 2026 · GitHub Advisory Database
Fix available
mariadb fixed in 3.2.5; mariadb fixed in 3.3.4; mariadb fixed in 3.4.7; mariadb fixed in 3.5.4
Oct 16, 2026 · GitHub Advisory Database
Fix available
mariadb fixed in 3.2.5
Oct 16, 2026 · GitHub Advisory Database
Fix available
mariadb fixed in 3.3.4
Oct 16, 2026 · GitHub Advisory Database
Fix available
mariadb fixed in 3.4.7
Oct 16, 2026 · GitHub Advisory Database
Fix available
mariadb fixed in 3.5.4
Oct 16, 2026 · GitHub Advisory Database
Updated
### Description When escaping string and binary parameters for the text protocol, the connector always escaped the quote character with a backslash, without ever consulting the session's NO_BACKSLASH_ESCAPES SQL mode. The server status flag was declared (STATUS_NO_BACKSLASH_ESCAPES) but never read. Under a server or session running with NO_BACKSLASH_ESCAPES, the backslash is an ordinary character
Sources
- CVE.orgVulnerability recordCVE-2026-107385
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-107385
30-day exploitation probability 0.4%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-r3rv-jm3r-62q2
GitHub Advisory Database record mirrored by OSV.
github.com - OpenSSF OSV / OSV ScannerPackage advisoryGHSA-r3rv-jm3r-62q2
MariaDB Connector/Node.js: SQL injection in the text protocol when the session uses NO_BACKSLASH_ESCAPES
osv.dev
References
Freshness
Last verified in this catalog Oct 18, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.