CVE-2026-139877Mysql2 SQL Injection
mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES
Published Nov 30, 2026 · Updated Dec 4, 2026 · Also known as EUVD-2026-139548, GHSA-f763-mv98-7rv9, GHSA-fx9j-5664-pqx4
Key Facts
Patch immediately- CVE-2026-139877 is a critical-severity vulnerability (CVSS 9.1 v4) affecting Mysql2 (Sidorares).
- It is not listed in any known-exploited vulnerabilities catalog. A public exploit is reported by tracking sources, but no code link is listed yet.
- EPSS estimates a 0.8% probability of exploitation in the next 30 days.
- Fixed versions are available, including Mysql2 3.25.0, sidorares/node-mysql2 3.25.0.
- Brandefense priority: patch immediately, because public exploit code exists for a high-severity flaw.
Scores
CVSS v4
9.1
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
EPSS (30-day exploit likelihood)
0.8%
Higher than 57.3% of all scored CVEs
Exploit maturity
Proof of concept
ATLAS score
45/100
Publication score, see How it works
Exploitation Verdict
KEV listed
Not listed
Federal due date
None
No federal due date
Ransomware use
Not reported
Attributed actors
None named
Exploit & Defence Guidance
Exploit maturity
Proof of concept
Public exploit code
1
Proof-of-concept links
In-the-wild evidence
0
Reports of active use
Advisories And Exploit References
- advisoryhttps://www.cve.org/CVERecord?id=CVE-2026-139877
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-139877
- advisoryGitHub Security Advisory (GHSA-f763-mv98-7rv9)
- advisoryVulnCheck Advisory: mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES
- patchhttps://github.com/sidorares/node-mysql2/commit/ef0dfa494a4fd30d82fa8ce5af3d2e46049d85ea
Description
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
4 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| Mysql2Sidorares | See advisory | 3.25.0 |
Patched Releases
Mysql2
3.25.0
sidorares/node-mysql2
3.25.0
Timeline
Publicly disclosed
Nov 30, 2026
Last updated
Dec 4, 2026
Weakness Type
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
References
- advisorycve.org · CVERecord
- advisorynvd.nist.gov · CVE-2026-139877
- advisoryGitHub Security Advisory (GHSA-f763-mv98-7rv9)
- advisoryVulnCheck Advisory: mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES
- patchgithub.com · ef0dfa4
FAQ
Common Questions.
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.
Affected: Mysql2 (Sidorares). The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
A public exploit is reported by tracking sources, but no code link is listed yet.
Fixed versions are available, including Mysql2 3.25.0, sidorares/node-mysql2 3.25.0.
Brandefense priority: patch immediately, because public exploit code exists for a high-severity flaw.
Is CVE-2026-139877 On Your Attack Surface?
Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.
Request A Demo