Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain Postgres role with foreign-object privileges
-
DeliveryCraft option value escaping the string literal
-
Exploitmysql_fdw sends unescaped name to MySQL
-
ExecutionInjected SQL runs under user-mapping credentials
-
ImpactRead/modify/destroy data on remote MySQL
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 an authenticated PostgreSQL user holding the privilege to CREATE or ALTER foreign tables or foreign servers, or to run IMPORT FOREIGN SCHEMA, against a mysql_fdw instance prior to 2.10.0. The injectable inputs are specific: the dbname and table_name options used by ANALYZE, the remote schema name and the LIMIT TO / EXCEPT table names in IMPORT FOREIGN SCHEMA, and the sql_mode option passed to the SET sql_mode command - these names are inserted into statements sent to MySQL without escaping. Limiting factors: no interaction with the PostgreSQL host OS is gained (impact lands only on the remote MySQL server under the user-mapping credentials), the attacker must already possess the relevant foreign-object privileges (PR:H), and the fix in 2.10.0 also rejects non-superuser-created servers using restricted options when altered. Impact is bounded by what the configured MySQL user mapping is permitted to do. |
| Impact | This is a genuine but access-gated SQL-injection flaw (CWE-89) rated medium (CVSS 4.0 = 6.4). The supplied 4.0 vector AV:N/AC:L/AT:N/PR:H/UI:N scores no impact on the PostgreSQL host itself (VC/VI/VA:N) but full confidentiality, integrity and availability impact on the subsequent system - the remote MySQL server (SC:H/SI:H/SA:H) - which correctly captures that the injection crosses a trust boundary rather than compromising Postgres directly. PR:H is the dominant limiter: an attacker must already hold the privilege to CREATE/ALTER foreign tables or foreign servers, or to run IMPORT FOREIGN SCHEMA, which in most deployments is an administrator or a specifically granted role, not an arbitrary user. No EPSS score was provided and the vulnerability is not in CISA KEV, so there is no signal of active or widespread exploitation; the vuln.today decision label is 'this_month', i.e. routine scheduled patching rather than emergency. The two references are a vendor advisory and the patch release, not exploit code, so no public exploit identified at time of analysis. Net: a real priority for environments that expose foreign-table/foreign-server creation to semi-trusted users, but a lower practical urgency where only trusted administrators hold those privileges. |
| Exploit ScenarioDerived | A PostgreSQL user who has been granted the ability to create or alter foreign tables/servers or to run IMPORT FOREIGN SCHEMA supplies a crafted dbname, table_name, remote schema name, LIMIT TO/EXCEPT table name, or sql_mode value that breaks out of the string literal mysql_fdw builds. When mysql_fdw sends the unescaped value to the remote MySQL server (e.g. during ANALYZE, IMPORT FOREIGN SCHEMA, or the SET sql_mode command), the injected SQL executes on MySQL with the credentials of the configured user mapping. No public exploit code was identified; exploitation requires the attacker to already hold foreign-object privileges (PR:H). |
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 releases prior to 2.10.0 allows an authenticated PostgreSQL user who can create or alter foreign tables or foreign servers, or run IMPORT FOREIGN SCHEMA, to break out of a string literal and execute arbitrary SQL on the remote MySQL server. The unescaped inputs are the dbname and table_name options used by ANALYZE, the remote schema name and the LIMIT TO / EXCEPT table names in IMPORT FOREIGN SCHEMA, and the sql_mode option passed to SET sql_mode; injected statements run with the privileges of the configured MySQL user mapping. Impact stays on the MySQL side - no code execution or file access on the PostgreSQL host - and is bounded by what that mapping is allowed to do; no public exploit has been identified at time of analysis, and the flaw is fixed in mysql_fdw 2.10.0.
RemediationAI
Vendor-released patch: mysql_fdw 2.10.0, available from https://github.com/EnterpriseDB/mysql_fdw/releases/tag/REL-2_10_0 and described in the advisory at https://www.enterpriseb.com/docs/security/advisories/cve202662153/ (https://www.enterprisedb.com/docs/security/advisories/cve202662153/); upgrading is the only complete fix, since the vulnerable concatenation is inside the extension. Plan the upgrade within the current month per the this_month priority, and note two upgrade effects from the release notes: IMPORT FOREIGN SCHEMA now imports column defaults as string literals, so expression defaults such as CURRENT_TIMESTAMP must be re-set on the foreign table after import, and foreign servers using restricted options that were created by non-superusers will be rejected when altered, requiring a superuser to re-create or alter them first. Because the injection is reachable only by roles holding CREATE/ALTER on foreign tables or foreign servers, or IMPORT FOREIGN SCHEMA, tightening those grants to trusted roles reduces exposure until patched, at the cost of blocking legitimate foreign-table administration for other users; revoking such privileges does not repair already-created malicious options, so existing foreign servers and foreign tables should be reviewed for injected values.
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 maps remote MySQL tables into PostgreSQL and translates PostgreSQL operations into MySQL statements. This is a CWE-89 injection rooted in missing quoting: option values stored in the PostgreSQL catalogs (dbname, table_name, remote schema name, LIMIT TO / EXCEPT table lists, sql_mode) are concatenated into SQL text sent to MySQL rather than being escaped or parameterized, so a value containing a quote and additional SQL terminates the literal and appends attacker-chosen statements. Reachability is gated by PostgreSQL privileges - the actor must already hold CREATE/ALTER on foreign servers or foreign tables, or the right to run IMPORT FOREIGN SCHEMA - which is why the assessed vector is PR:H with scope changed (S:C): the vulnerable component is PostgreSQL-side, but the confidentiality, integrity and availability impact lands on the remote MySQL instance under the user-mapping credentials. The 2.10.0 fix escapes these names and accepts only letters, digits, underscores and commas in sql_mode; the same release permanently adds NO_BACKSLASH_ESCAPES to the remote session's sql_mode and now rejects foreign servers using restricted options that were created by non-superusers when those servers are altered.
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:N/PR:H/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
Requires privileged foreign-object access (PR:H) but injected SQL executes on a separate MySQL system (S:C) with full C/I/A impact there under the user-mapping credentials.
Primary rating from Vendor (EDB).
CVSS VectorVendor: EDB
DescriptionCVE.org
mysql_fdw inserts several values into statements sent to the remote MySQL server without escaping them: the dbname and table_name options in ANALYZE, the remote schema name and the LIMIT TO and EXCEPT table names in IMPORT FOREIGN SCHEMA, and the sql_mode option in the SET sql_mode command. A user who can create or alter foreign tables or foreign servers, or run IMPORT FOREIGN SCHEMA, can break out of the string 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 escapes these names and accepts only letters, digits, underscores and commas in sql_mode.
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-135560
GHSA-wcgx-886g-jx87
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB