CVE-2026-139877
High 7.4 P4 · Monitor (17/100)mysql2 before 3.25.0 contains an sql injection vulnerability in Connection.format() and Connection.escape() because quotes are always backs…
Confirmed facts from the sources
- CVSS
- 7.4 (High) · CVSS 3.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Scored by disclosure@vulncheck.com - Exploitation confirmed
- Not in the CISA KEV catalog
- Exploitation estimated (EPSS)
- Not published by the sources
- Public exploit
- No reference to a public exploit.
- Fix
- No fix known
- Monitored technologies
- No monitored technology
Description (source)
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.
Affected products and versions
| Vendor / product | Affected versions | Fixed in | Source |
|---|---|---|---|
| npm: mysql2 | < 3.25.0 | — | nvd |
Versions as published. “Fixed in” only where a source names the version explicitly.
Recommended mitigation
The sources name no fix or mitigation yet.
In general: check your versions, update to a fixed version, limit exposure until then and follow the vendor guidance.
AI interpretation
No AI interpretation yet – it is created for urgent advisories of monitored technologies. The facts above apply regardless.
Why this priority?: P4 · Monitor (17/100)
- No EPSS score yet (+0)
- Technical severity: CVSS 7.4 (HIGH) – on its own not a reason for top priority (+12)
- No fix known – mitigations needed (+5)
Priority is a general assessment from CVSS, KEV, EPSS, exploits, relevance and fix availability. Whether a specific environment is affected depends on its versions, configuration and exposure.
Original advisories and links
- Advisory https://nvd.nist.gov/vuln/detail/CVE-2026-139877 · nvd
- Reference https://github.com/sidorares/node-mysql2/blob/v3.24.6/lib/base/connection.js#L648-L675 · disclosure@vulncheck.com
- Reference https://github.com/sidorares/node-mysql2/commit/ef0dfa494a4fd30d82fa8ce5af3d2e46049d85ea · disclosure@vulncheck.com
- Reference https://github.com/sidorares/node-mysql2/releases/tag/v3.25.0 · disclosure@vulncheck.com
- Reference https://github.com/sidorares/node-mysql2/security/advisories/GHSA-f763-mv98-7rv9 · disclosure@vulncheck.com
- Reference https://www.vulncheck.com/advisories/mysql2-before-3.25.0-sql-injection-via-placeholder-es… · disclosure@vulncheck.com