Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with SELECT on a foreign table
-
ExploitSupply literal ending in 0x5C byte
-
ExecutionEscaping backslash absorbed, quote left unescaped
-
ImpactExecute arbitrary SQL on remote MySQL as user mapping
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 | Exploitation requires all of: (1) a mysql_fdw remote connection configured with a multi-byte character set such as GBK, SJIS, or Big5; (2) MySQL's default backslash escaping in effect (i.e., sql_mode WITHOUT NO_BACKSLASH_ESCAPES, the pre-2.10.0 behavior); and (3) an authenticated PostgreSQL user who holds at least SELECT on a mysql_fdw foreign table so that a crafted string constant can be pushed down into an ordinary WHERE-clause literal. Limiting factors: it does not apply to single-byte/ASCII-safe charsets or to sessions already running with NO_BACKSLASH_ESCAPES, authentication to PostgreSQL is required (not remote-unauthenticated), and from mysql_fdw 2.10.0 the fix removes the condition entirely by forcing NO_BACKSLASH_ESCAPES and doubling single quotes; the vendor states upgrading is the fix. |
| Impact | This is a genuine but conditional server-side SQL injection (CWE-89), rated medium by the supplied CVSS 4.0 vector (5.8, CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H). The signals are internally consistent and point away from emergency status: AV:N makes it network-reachable, but AT:P reflects a real attack requirement (the remote connection must use a multi-byte character set such as GBK/SJIS/Big5 AND MySQL's default backslash escaping must be active), and PR:L reflects that the attacker must already be an authenticated PostgreSQL user holding SELECT on a mysql_fdw foreign table. Impact is entirely on the subsequent system: VC/VI/VA are N (the PostgreSQL/FDW host itself is not directly compromised) while SC/SI/SA are H because arbitrary SQL runs on the remote MySQL server under the user mapping's credentials. No EPSS score, no CISA KEV listing, and no PoC/exploit reference are present in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation. The vuln.today Decision label is this_month (not act_now/emergency), which aligns with a patched, medium-severity, precondition-gated flaw. Net: prioritize for scheduled patching of affected deployments that actually use multi-byte charsets, rather than as a drop-everything emergency; the headline risk is privilege escalation within MySQL (an authenticated low-privilege PostgreSQL user leveraging the user-mapping account) rather than mass remote compromise. |
| Exploit ScenarioDerived | An authenticated PostgreSQL user holding only SELECT on a mysql_fdw foreign table - where the remote connection uses a multi-byte charset like GBK and MySQL backslash escaping is in effect - supplies a crafted WHERE-clause value whose trailing byte is 0x5C. The multi-byte lead byte absorbs the escaping backslash so the following closing quote is left unescaped, letting the attacker break out of the string literal and run arbitrary SQL on the remote MySQL server with the user mapping's credentials. No public exploit identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 25, 2026
SQL injection in mysql_fdw before 2.10.0 allows an authenticated PostgreSQL user with SELECT on a foreign table to execute arbitrary SQL on the linked MySQL server under the credentials of the user mapping. The flaw requires the mysql_fdw connection to use a multi-byte character set such as GBK, SJIS, or Big5 while MySQL's default backslash escaping is active; values in pushed-down WHERE-clause literals can then absorb the escape and leave a quote unescaped. Vendor-released patch 2.10.0 fixes this by forcing NO_BACKSLASH_ESCAPES and doubling single quotes; no public exploit identified at time of analysis.
RemediationAI
Upgrade mysql_fdw to 2.10.0 or later; this is the complete vendor fix and it forces NO_BACKSLASH_ESCAPES into the remote session sql_mode while escaping string literals by doubling single quotes (advisory: https://www.enterprisedb.com/docs/security/advisories/cve202662151/; release: https://github.com/EnterpriseDB/mysql_fdw/releases/tag/REL-2_10_0). If upgrading cannot be done immediately, ensure mysql_fdw remote MySQL sessions run with NO_BACKSLASH_ESCAPES where the deployment allows it and avoid multi-byte character sets such as GBK, SJIS, or Big5 for mysql_fdw connections that cannot enforce that sql_mode; both reduce the vulnerable condition but do not replace the patch. As a secondary containment, restrict SELECT privileges on mysql_fdw foreign tables to users who require them, accepting that this limits legitimate reporting and does not remove the risk for those still granted access.
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
mysql_fdw is EnterpriseDB's PostgreSQL foreign data wrapper that translates PostgreSQL queries into SQL sent to a remote MySQL server. The vulnerable versions construct string literals with an escaping routine that is not character-set aware; in connections using multi-byte charsets (GBK, SJIS, Big5) and MySQL's default backslash escaping (sql_mode without NO_BACKSLASH_ESCAPES), a crafted value ending in byte 0x5C consumes the escaping backslash and leaves the following single quote unescaped. This is CWE-89 SQL injection in pushed-down string constants, including ordinary WHERE-clause literals, so a PostgreSQL user with only SELECT on a foreign table can break out of the literal and run SQL on the remote MySQL server using the user mapping credentials. The CVSS vector requires PR:L (authenticated) and AT:P (specific attack requirements: multi-byte charset plus default backslash escaping); versions before 2.10.0 are affected. The fix in 2.10.0 forces NO_BACKSLASH_ESCAPES into the remote session sql_mode and escapes literals by doubling single quotes.
Know when PostgreSQL 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:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
Network-reachable but AC:H for the required multi-byte-charset/backslash-escaping condition; PR:L for an authenticated SELECT user; S:C with C/I/A:H because arbitrary SQL executes on the separate remote MySQL server.
Primary rating from Vendor (EDB).
CVSS VectorVendor: EDB
DescriptionCVE.org
mysql_fdw builds string literals for queries sent to the remote MySQL server with an escaping routine that is not character-set aware. When the connection uses a multi-byte character set such as GBK, SJIS or Big5 and MySQL's default backslash escaping is in effect, a crafted value whose trailing byte is 0x5C absorbs the escaping backslash and leaves the following quote unescaped. The routine handles every pushed-down string constant, including ordinary WHERE-clause literals, so an authenticated user with only SELECT on a foreign table can break out of the literal and run arbitrary SQL on the remote MySQL server with the credentials of the user mapping. The issue is fixed in mysql_fdw 2.10.0. From mysql_fdw 2.10.0, mysql_fdw forces NO_BACKSLASH_ESCAPES into the session sql_mode and escapes string literals by doubling single quotes.
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.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-135558
GHSA-373c-36hr-jp62
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB