cvelo
P2 · HighCVSS 7.4EPSS 0.8%

mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES

  • CVE-2026-139877
  • GHSA-fx9j-5664-pqx4
  • EUVD-2026-139548

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.

Text from the CVE.org record.

Recommendation

  • sidorares mysql2

    • If you run a version before 3.25.0update to 3.25.0 or later

Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • sidorares mysql2

    Affected versionsFixed in
    before 3.25.03.25.0

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.