{"id":"CVE-2026-139877","aliases":["CVE-2026-139877"],"related":[],"kind":"vulnerability","state":"published","title":"mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-30T16:20:44.034Z","modified":"2026-11-30T17:18:52.200Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","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","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","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","score":9.1,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.25.0","status":"affected"}],"vendor":"sidorares","product":"mysql2","repo":"https://github.com/sidorares/node-mysql2","source":"cvelist"}],"references":[{"url":"https://github.com/sidorares/node-mysql2/security/advisories/GHSA-f763-mv98-7rv9","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/commit/ef0dfa494a4fd30d82fa8ce5af3d2e46049d85ea","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/releases/tag/v3.25.0","tags":["release-notes"],"sources":["cvelist","nvd"]},{"url":"https://github.com/sidorares/node-mysql2/blob/v3.24.6/lib/base/connection.js#L648-L675","tags":["technical-description"],"sources":["cvelist","nvd"]},{"url":"https://www.vulncheck.com/advisories/mysql2-before-3.25.0-sql-injection-via-placeholder-escaping-under-no-backslash-escapes","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["Vishal Suwalka","secondseccve"],"assigner":"VulnCheck","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139877","url":"https://www.cve.org/CVERecord?id=CVE-2026-139877","licence":"CVE Terms of Use","modified":"2026-11-30T16:20:44.034Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139877","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139877","licence":"Public domain","modified":"2026-11-30T17:18:52.200Z"}],"updatedAt":"2026-11-30T17:32:19.355Z","epss":{"score":0.00626,"percentile":0.51347,"date":"2026-12-01T12:00:22.000Z"}}