ZeroDay Brief
Happy holidays from ZeroDay Brief!
CVE-2026-139877 Exploit code public

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.

CVSS
7.4High
Chance of exploitation (EPSS)
0.78%
Published
Nov 30, 2026
In the news
Not yet
More from this vendor

What to do

A serious SQL injection flaw in Sidorares Mysql2 that can be attacked over the network without logging in. Exploit code is public, so patch it soon.

Action: Check the vendor's advisory in the references and apply updates as soon as they are available.

Fixed in: 3.25.0

Affected versions
Sidorares Mysql2
Before 3.25.0

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.

CWE-89

Affected products

Get alerts for these →

Timeline 2

Latest change: Xeyalm/CVE-2026-139877: mysql2: remote SQL injection in placeholder escaping (CVE-2026-139877) (Dec 1, 2026)

News, advisories, exploit code, scanner detection and exploitation, newest first.

Mon, Nov 30, 2026

  1. CVECVE-2026-139877 published (CVSS 7.4)CVE Program · 17:18 UTC

Exploit code

Visit at your own risk. These are third-party sites we find automatically. We do not test, review or vouch for them, and fake proof-of-concept repositories sometimes contain malware.

References 6

  • github.com /sidorares/node-mysql2/blob/v3.24.6/lib/base/connection.js#L648-L675
  • github.com /sidorares/node-mysql2/commit/ef0dfa494a4fd30d82fa8ce5af3d2e46049d85ea
  • github.com /sidorares/node-mysql2/releases/tag/v3.25.0
  • github.com /sidorares/node-mysql2/security/advisories/GHSA-f763-mv98-7rv9
  • www.vulncheck.com /advisories/mysql2-before-3.25.0-sql-injection-via-placeholder-escaping-under-no-backslash-escapes
  • github.com /sidorares/node-mysql2/security/advisories/GHSA-f763-mv98-7rv9

You are leaving ZeroDay Brief

This link goes to exploit code on a third-party site. We find these links automatically and do not test, review or vouch for them. They may contain malware or fake exploits.

We are not responsible for anything that happens if you open the page or run its code. Never run exploit code on systems you care about.

↑ ↓ moveEnter openEsc closeTry “CVE-2026”, “fortinet” or “ivanti”