Skip to content
DayZeroHub
Critical Not yet writtenCVSS 9.1CVE-2026-139877

CVE-2026-139877: mysql2 before 3.25.0 SQL Injection via Placeholder Escaping under NO_BACKSLASH_ESCAPES

sidorares mysql2

Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.

Summary

CVE-2026-139877: critical-severity vulnerability (CVSS 9.1) in sidorares mysql2.

What happened

Original description from the source: 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.

Why it matters

Critical severity, CVSS 9.1.

Affected products and versions

sidorares mysql2 < 3.25.0

ProductVersionsFixed in
sidorares mysql2< 3.25.0—

Action recommended by the source

See the official references for the fix or mitigation.

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-89

Relevant change history

  1. Published

    Preliminary advisory published.