CVE-2026-139877

mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES

Published Nov 30, 2026 CVSS 4.0 · 9.1 Critical EPSS n/a KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
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.
Title mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES
First Time appeared Sidorares
Sidorares mysql2
Weaknesses CWE-89
CPEs cpe:2.3:a:sidorares:mysql2:*:*:*:*:*:*:*:*
Vendors & Products Sidorares
Sidorares mysql2
References
Metrics cvssV3_1

{'score': 7.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N'}

cvssV4_0

{'score': 9.1, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 30, 2026, 4:20 PM
Reserved
Nov 30, 2026, 3:57 PM
Status
Received
Published
Nov 30, 2026, 5:18 PM
Modified
Nov 30, 2026, 5:18 PM