{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-139877", "assignerOrgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10", "state": "PUBLISHED", "assignerShortName": "VulnCheck", "dateReserved": "2026-11-30T15:57:17.731Z", "datePublished": "2026-11-30T16:20:44.034Z", "dateUpdated": "2026-11-30T16:20:44.034Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10", "shortName": "VulnCheck", "dateUpdated": "2026-11-30T16:20:44.034Z" }, "datePublic": "2026-11-17T00:00:00.000Z", "title": "mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES", "descriptions": [ { "lang": "en", "value": "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." } ], "problemTypes": [ { "descriptions": [ { "lang": "en", "description": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "cweId": "CWE-89", "type": "CWE" } ] } ], "affected": [ { "vendor": "sidorares", "product": "mysql2", "defaultStatus": "unaffected", "versions": [ { "version": "0", "lessThan": "3.25.0", "versionType": "semver", "status": "affected" } ], "packageURL": "pkg:npm/mysql2", "repo": "https://github.com/sidorares/node-mysql2" } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:a:sidorares:mysql2:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.25.0" } ] } ] } ], "metrics": [ { "format": "CVSS", "cvssV4_0": { "version": "4.0", "vectorString": "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", "attackVector": "NETWORK", "attackComplexity": "HIGH", "attackRequirements": "PRESENT", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "baseScore": 9.1, "baseSeverity": "CRITICAL" } }, { "format": "CVSS", "cvssV3_1": { "version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE", "baseScore": 7.4, "baseSeverity": "HIGH" } } ], "references": [ { "url": "https://github.com/sidorares/node-mysql2/security/advisories/GHSA-f763-mv98-7rv9", "tags": [ "vendor-advisory" ], "name": "GitHub Security Advisory (GHSA-f763-mv98-7rv9)" }, { "url": "https://github.com/sidorares/node-mysql2/commit/ef0dfa494a4fd30d82fa8ce5af3d2e46049d85ea", "tags": [ "patch" ] }, { "url": "https://github.com/sidorares/node-mysql2/releases/tag/v3.25.0", "tags": [ "release-notes" ], "name": "mysql2 v3.25.0 Release Notes" }, { "url": "https://github.com/sidorares/node-mysql2/blob/v3.24.6/lib/base/connection.js#L648-L675", "tags": [ "technical-description" ] }, { "url": "https://www.vulncheck.com/advisories/mysql2-before-3.25.0-sql-injection-via-placeholder-escaping-under-no-backslash-escapes", "name": "VulnCheck Advisory: mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES", "tags": [ "third-party-advisory" ] } ], "credits": [ { "lang": "en", "value": "Vishal Suwalka", "type": "finder" }, { "lang": "en", "value": "secondseccve", "type": "finder" } ], "x_generator": { "engine": "vulncheck-endgame" } } } }