Skip to main content
CVE-2026-139877VulnerabilityPublished

mysql2 before 3.25.0 contains an sql injection vulnerability in Connection.format() and Connection.escape() because

Source GCVE Database

0
Compare
Authoritative record:CVE-2026-139877· Critical 9.1

Not known to be exploited · CVSS 9.1 Critical : upgrade to 3.25.0 as a priority.

Data as of 30 Nov 2026, 19:59 UTC

CVSS 4.0 base score
9.1Critical
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (VulnCheck)CVSS 4.09.1
CNA (VulnCheck)CVSS 3.17.4
Patch
Available – fixed in 3.25.0
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 30 Nov 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Nov 2026.

What to do

Upgrade mysql2 to 3.25.0.

Affected software

ProductAffectedFixed in
npmmysql2pkg:npm/mysql2Other threatsAffected
  • <3.25.0
Fixed in
  • 3.25.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade mysql2 to version 3.25.0 or later where this vulnerability is fixed. No vendor advisory or patch links are provided in the data, but the fixed version is explicitly stated. Until upgrading, avoid enabling NO_BACKSLASH_ESCAPES SQL mode or do not use untrusted input in query placeholders. Patch status is confirmed by the fixed version indication.

Description

mysql2 versions prior to 3.25.0 contain an SQL injection vulnerability in the Connection.format() and Connection.escape() functions. This occurs because quotes are always backslash-escaped regardless of the session's SQL mode. When the NO_BACKSLASH_ESCAPES mode is enabled, attackers can craft input via ? placeholders in connection.query() to prematurely close string literals and append malicious SQL, potentially disclosing or modifying data.

References

Community reviews

Loading reviews…