Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.
Summary
CVE-2026-139877: critical-severity vulnerability (CVSS 9.1) in sidorares mysql2.
What happened
Original description from the 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.
Why it matters
Critical severity, CVSS 9.1.
Affected products and versions
sidorares mysql2 < 3.25.0
| Product | Versions | Fixed in |
|---|---|---|
| sidorares mysql2 | < 3.25.0 | — |
Action recommended by the source
See the official references for the fix or mitigation.
Sources and references
- https://github.com/sidorares/node-mysql2/security/advisories/GHSA-f763-mv98-7rv9 — CVE Program
- https://github.com/sidorares/node-mysql2/commit/ef0dfa494a4fd30d82fa8ce5af3d2e46049d85ea — CVE Program
- https://github.com/sidorares/node-mysql2/releases/tag/v3.25.0 — CVE Program
- https://github.com/sidorares/node-mysql2/blob/v3.24.6/lib/base/connection.js#L648-L675 — CVE Program
- https://www.vulncheck.com/advisories/mysql2-before-3.25.0-sql-injection-via-placeholder-escaping-under-no-backslash-escapes — CVE Program
Weaknesses (CWE): CWE-89
Relevant change history
Published
Preliminary advisory published.