CVE-2026-139877 - mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES
Vulnerability · Reported by NVD · · CWE-89
- Severity
- Critical Risk score 91/100
- CVSS
- 9.1 v4.0 · from NVD
- Exploit chance (EPSS)
- – Not available yet
- Known exploited
- No Not in CISA KEV
Summary
mysql2 before 3.25.0 contains an sql injection vulnerability in Connection.format() and Connection.escape() because quotes are always backslash-escaped regardless of session SQL mode. When NO_BACKSLASH_ESCAPES is enabled, attackers can pass crafted values through ? placeholders in connection.query() to close string literals and append SQL, disclosing or modifying data.
How this vulnerability can be exploited
This is a SQL injection flaw (CWE-89). An attacker can exploit this vulnerability remotely over the network, without any login, and without any action from a user. Attack complexity is high, meaning specific conditions must exist first.
Is it being exploited?
There is no public evidence of active exploitation yet. Monitor for exploit releases, especially if the product is internet-facing.
Patch priority and what to do
Patch as soon as possible, ideally within days. It is remotely reachable or critical severity, so exposure to the internet greatly increases risk. 1) Check whether you run the affected product and version. 2) Apply the vendor update or patch listed in the advisory. 3) Until patched, restrict network access to the service (firewall, VPN, WAF rules). 4) Review logs for signs of exploitation since the publication date.
CVSS vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S
Tags
CVE-2026-139877
Sources & references
- Original article / advisory (NVD) ↗
- NIST NVD: CVE-2026-139877 ↗
- CVE.org record ↗
- FIRST.org EPSS model ↗
How this data is collected: methodology & sources.