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.
Advisories

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Mon, 30 Nov 2026 16:30:00 +0000

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'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-11-30T16:20:44.034Z

Reserved: 2026-11-30T15:57:17.731Z

Link: CVE-2026-139877

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-11-30T17:18:52.200

Modified: 2026-11-30T17:18:52.200

Link: CVE-2026-139877

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses