Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach app endpoint using mysql2 text query
-
DeliverySubmit crafted value through ? placeholder
-
ExploitDriver backslash-escapes quote, server reads it literally
-
ExecutionString literal closes, appended UNION/SQL executes
-
ImpactDisclose or modify unintended database data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Two concrete conditions must both hold. (1) The MySQL server session must run with NO_BACKSLASH_ESCAPES in its sql_mode - set via my.cnf sql_mode, --sql-mode=, or SET [GLOBAL|SESSION] sql_mode; this is NOT a MySQL default and is outside the attacker's control, which is precisely why CVSS marks AC:H / AT:P. (2) The application must pass attacker-influenced values into the text-protocol path - connection.query() / connection.escape() / SqlString.format() (directly or via an ORM/framework built on them), including the parameterised '... WHERE x = ?' pattern assumed safe. LIMITING FACTORS: connection.execute() (prepared statements) is NOT affected and fully mitigates; if the server does not run NO_BACKSLASH_ESCAPES the specific flaw does not fire; and the attacker cannot themselves enable the required server mode. Realistic impact therefore depends on deployment configuration, not on any default being vulnerable. |
| Impact | This is a genuine, conditionally-high-priority SQL injection (CWE-89) rather than a CVSS-inflated non-issue, but the single most important qualifier is the precondition. The input carries TWO different scores: NVD's CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N) = 9.1, and the vendor GHSA's CVSS 3.1 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N) = 7.4 High - the 4.0 framework rates the same facts materially higher, so treat 'severity' as a range, not a point. Both agree on the mechanism: network vector, no privileges or user interaction, high confidentiality AND integrity impact (data disclosure and tampering), no availability impact. Both also encode the catch as high attack complexity (AC:H) and, in 4.0, a present attack requirement (AT:P): the attacker fully controls the payload but the vulnerable state - the server session running with NO_BACKSLASH_ESCAPES in sql_mode - is a deployment configuration they cannot set. The vuln.today decision label is act_now, which is consistent with the confirmed, verified working PoC and the high impact. No EPSS score and no CISA KEV entry are present in the input, so there is no signal of mass or active exploitation - the urgency here is driven by the act_now decision and the published, proven exploit, not by observed in-the-wild activity. Net: where NO_BACKSLASH_ESCAPES is enabled this is a real, patch-now data-exposure/data-tampering flaw reachable through parameterised queries developers believe are safe; where that mode is off (the MySQL default), the specific flaw does not fire. Verify your own server/session sql_mode before downgrading or escalating priority. |
| Exploit ScenarioDerived | An application on mysql2 <= 3.24.6 talks to a MySQL server whose session runs with NO_BACKSLASH_ESCAPES (set for ANSI/standards compatibility or to store literal backslashes) and passes an attacker-influenced value into connection.query('... WHERE name = ?', [value]). Because mysql2 escapes a quote as \' regardless of SQL mode, the server treats the backslash as literal, the quote closes the string literal, and appended text such as a UNION SELECT runs as SQL - leaking or altering data the query never referenced. A complete, self-contained PoC is published in the GHSA advisory and shown with a verified run leaking a planted secrets-table marker; attack complexity is high only because the attacker depends on that non-default server mode. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 30, 2026
SQL injection in the npm package mysql2 through 3.24.6 allows crafted values passed through ? placeholders in connection.query() to close string literals and append attacker SQL when the MySQL server session runs with NO_BACKSLASH_ESCAPES in its sql_mode, enabling disclosure or modification of data the statement never intended to select. The root cause is the client-side escaper behind Connection.format() and Connection.escape(), which always emits \' regardless of the session's SQL mode. The bug is conditional, not default-exploitable: the deployment must have enabled NO_BACKSLASH_ESCAPES (outside the attacker's control), and only the text protocol is affected - connection.execute() prepared statements are immune. A public proof-of-concept with a verified run against the released 3.24.6 package and a stock mysql:8.4 server exists, and the vendor fix ships in 3.25.0; the vuln.today priority label is act_now.
RemediationAI
Upgrade mysql2 to 3.25.0 or later, which fixes the escaping to double quotes ('') whenever the server reports the NO_BACKSLASH_ESCAPES status flag (vendor advisory: https://github.com/sidorares/node-mysql2/security/advisories/GHSA-f763-mv98-7rv9, release: https://github.com/sidorares/node-mysql2/releases/tag/v3.25.0). On 3.25.0 and above, additionally set the noBackslashEscapes: true connection option on servers configured with NO_BACKSLASH_ESCAPES so escaping no longer depends on the status the server reports - a defence against pooled connections whose status could be stale. Where upgrading is not immediately possible, replace connection.query()/connection.escape() usage with connection.execute() prepared statements for all attacker-influenced values, including the '... WHERE x = ?' pattern, since the binary protocol path is not affected; the trade-off is that execute() does not support some multi-statement and dynamic-SQL patterns, and ORMs built on the text path must be reconfigured or patched to use it. A further compensating measure is removing NO_BACKSLASH_ESCAPES from the server sql_mode (my.cnf, --sql-mode, or SET GLOBAL/SESSION sql_mode), which eliminates the vulnerable condition entirely but may break applications or standards-compatibility settings that rely on that mode for storing literal backslashes, so it should be validated in staging first.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The issue is CWE-89 (SQL injection) arising in mysql2's client-side SQL string escaping layer (sql-escaper), not in the server protocol handling itself. When an application calls connection.query(sql, values), the driver substitutes each placeholder via Connection.format() -> SqlString.format() -> SqlString.escape(), which unconditionally renders a single quote as the backslash-escaped form \'. That encoding is only meaningful when the server interprets backslash as an escape character. Under the SQL mode NO_BACKSLASH_ESCAPES the server treats a backslash as an ordinary literal, so a payload such as x\' UNION SELECT secret,2,3 FROM secrets -- terminates the literal at the quote and the trailing text is parsed as SQL, with the appended comment swallowing the quote the driver added. The fix commit ef0dfa494a4fd30d82fa8ce5af3d2e46049d85ea (PR #4684) records the server status flag SERVER_STATUS_NO_BACKSLASH_ESCAPES from the handshake and OK packets, tracks it via connection.serverStatus, and doubles quotes ('') instead when the mode is active; it also formats the statement for the alternate mode so a session-mode change mid-connection is handled, and 3.25.0 adds a noBackslashEscapes connection option (PR #4718) to pin the escaping behaviour. Severity assessments diverge: the feed's CVSS 4.0 vector scores 9.1 with AC:H/AT:P/PR:N/UI:N, the vendor GHSA rates CVSS 3.1 7.4 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N), and our independent assessment adopts that 7.4 vector - all agree on high confidentiality and integrity impact with no availability impact, and all condition the exploit on deployment configuration rather than an attacker-settable state.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-reachable, no auth or user interaction (PR:N/UI:N), but AC:H because exploitation needs the non-default NO_BACKSLASH_ESCAPES server mode; injection yields data disclosure and tampering (C:H/I:H) without availability loss.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
2DescriptionCVE.org
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.
Technical POC Analysis
CWE-89 SQL injection.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A critical SQL injection flaw in the widely used mysql2 Node.js database library (through version 3.24.6) could let attackers read or alter data beyond what an application's query intended, affecting any service that relies on this driver and operates with a non-default MySQL SQL mode. Leadership should care because the exposure spans application data confidentiality and integrity, and while exploitation is conditional, a verified public proof-of-concept lowers the barrier for opportunistic attackers targeting affected systems.
Vendor-released patch: 3.25.0
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-139548
GHSA-fx9j-5664-pqx4
NVD
CVE.org
EPSS
Exploit-DB