mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES
CVE-2026-139877
Key Information:
- Vendor
Sidorares
- Status
- Mysql2
- CVE ID
- CVE ID:
- CVE-2026-139877
- Vendor
- CVE Published:
- 30 November 2026
- Fixed in
- Fixed in:
- 3.25.0
Timeline
Trending 1 day after it was published
- 📈
Vulnerability started trending
Vulnerability published
Vulnerability Reserved
Badges
How risky is it?
- Yes: Works over the network, no login needed
- No: No public exploit yet
- No: Not on CISA's exploited list
- No: No ransomware use seen
Our verdict
Patch this week
Exploitation is likely. Prioritise the fix.
What to do
1Update to a fixed version
2Can't patch yet? Reduce exposure
It can be reached over the network, so limit who can reach mysql2. Block it from the internet, allow only trusted hosts or a VPN, and turn off the affected feature if you don't use it, until you can update.
3Why it's rated "Patch this week"
- It can be exploited remotely without credentials.
- Its CVSS severity is critical (9.1).
What is CVE-2026-139877?
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.
References
Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities · Report a correction
