Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker controls or MITMs remote MySQL server
-
DeliveryVictim runs IMPORT FOREIGN SCHEMA against it
-
ExploitServer returns crafted information_schema metadata
-
ExecutionUnquoted COLUMN_DEFAULT/ENUM name injects SQL into CREATE FOREIGN TABLE
-
ImpactArbitrary SQL executes in victim's PostgreSQL session
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 that a local PostgreSQL user actively run IMPORT FOREIGN SCHEMA through mysql_fdw against a MySQL server that the attacker controls, has compromised, or whose connection the attacker can tamper with (e.g. MITM an unencrypted link); the attacker then returns crafted information_schema metadata whose COLUMN_DEFAULT value is placed into the DEFAULT clause, or whose generated ENUM type name is inserted, without quoting. Limiting factors that reduce realistic risk: the attack is not self-triggering - it depends on victim-initiated user interaction (UI:A), on the deployment actually using mysql_fdw to import schemas from an untrusted or attacker-reachable MySQL instance, and on versions prior to 2.10.0; it does not apply to default PostgreSQL installations without this extension or without an import run against a hostile server. |
| Impact | This is a genuine SQL injection (CWE-89) in mysql_fdw's IMPORT FOREIGN SCHEMA path, but its real-world risk is moderated by the conditions required to reach it rather than its 7.5 CVSS score alone. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H) is internally consistent with the description: PR:N because the attacker needs no PostgreSQL credentials (they control, compromise, or tamper with the remote MySQL server), UI:A because a local PostgreSQL user must actively run IMPORT FOREIGN SCHEMA, and AT:P because the attacker must be in a position to return crafted information_schema metadata. No EPSS score, no CISA KEV listing, and no public exploit reference were supplied, so there is no public exploit identified at time of analysis and no evidence of active exploitation; the two provided references are only the EDB advisory and the 2.10.0 patch release. The vuln.today Decision label is 'this_week', consistent with a serious but not actively-exploited, interaction-gated flaw rather than an emergency. Net assessment: a real, high-impact code-injection bug worth patching this week for anyone running mysql_fdw against untrusted or externally-reachable MySQL servers, but not a mass-exploitable internet-facing issue, because it requires a victim-initiated import against an attacker-influenced MySQL endpoint. |
| Exploit ScenarioDerived | An attacker who controls or has compromised a MySQL server (or can man-in-the-middle the mysql_fdw connection) returns crafted information_schema metadata in which a COLUMN_DEFAULT value or generated ENUM type name embeds SQL. When a PostgreSQL user runs IMPORT FOREIGN SCHEMA against that server, mysql_fdw builds CREATE FOREIGN TABLE statements with the unquoted metadata and executes the injected SQL in that user's local PostgreSQL session, potentially with high privileges. No public exploit is identified at time of analysis, and exploitation hinges on the victim initiating the import (UI:A). |
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's IMPORT FOREIGN SCHEMA handling lets a malicious, compromised, or man-in-the-middle'd MySQL server execute arbitrary SQL inside the local PostgreSQL session of the user who runs the import. All mysql_fdw versions prior to 2.10.0 are affected: the extension copies remote information_schema metadata into locally executed CREATE FOREIGN TABLE statements without quoting the COLUMN_DEFAULT value or the generated ENUM type name. Reaching the flaw requires the victim to actively run IMPORT FOREIGN SCHEMA against an attacker-reachable server (unauthenticated remote attacker, user interaction required), so exploitation is not self-triggering and does not affect default PostgreSQL installations without the extension; no public exploit code or active exploitation has been identified at time of analysis. EnterpriseDB has released mysql_fdw 2.10.0, which quotes these values, and the issue is prioritized for this week's patch cycle.
RemediationAI
Vendor-released patch: upgrade to mysql_fdw 2.10.0 (https://github.com/EnterpriseDB/mysql_fdw/releases/tag/REL-2_10_0; advisory https://www.enterprisedb.com/docs/security/advisories/cve202662154/), which quotes the COLUMN_DEFAULT value and generated ENUM type name before building the CREATE FOREIGN TABLE statements. Plan for two documented behavioural changes in that release: IMPORT FOREIGN SCHEMA now imports column defaults as string literals, so expression defaults such as CURRENT_TIMESTAMP must be set again on the foreign table after import, and NO_BACKSLASH_ESCAPES is now always added to the remote session's sql_mode, which can alter string-escaping semantics for existing applications. Until the upgrade is applied, the exposure is bounded by the exploitation prerequisites: do not run IMPORT FOREIGN SCHEMA against MySQL servers you do not control or that sit across an untrusted network path, and where the connection must cross such a path protect it against tampering so a third party cannot substitute crafted information_schema metadata; where the remote server cannot be trusted, pre-create the foreign tables manually with explicit column definitions instead of importing them, at the cost of losing the automatic schema mapping that IMPORT FOREIGN SCHEMA provides. The 2.10.0 release also carries unrelated correctness and safety fixes, including quoted row-id columns in UPDATE/DELETE, buffer limits for BYTEA and TEXT reads, and rejection of UPDATE/DELETE on foreign tables whose first column is part of a composite key.
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 federates queries to MySQL/MariaDB servers; IMPORT FOREIGN SCHEMA is the routine that queries the remote information_schema and synthesizes local CREATE FOREIGN TABLE DDL from the returned column metadata. This is a CWE-89 SQL injection in that synthesis step: the remote COLUMN_DEFAULT value is concatenated into the DEFAULT clause of the generated statement, and the name of the auto-generated ENUM type is likewise inserted without quoting. Because the metadata is attacker-influenced whenever the MySQL endpoint is hostile, tampered with (for example an unencrypted link subject to MITM), the injected fragment runs with the privileges of the local PostgreSQL role performing the import. The CVSS:4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:A) and the assessed CVSS:3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) both describe an unauthenticated remote attacker whose prerequisite is victim-initiated interaction with a server the attacker controls; the trigger requires that specific import path, and no other code paths are described as vulnerable in the available sources.
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:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Attacker needs no PostgreSQL auth (controls the remote MySQL server, PR:N) but a victim must run the import (UI:R); injected SQL runs in the user's own PostgreSQL authority (S:U) with high C/I/A.
Primary rating from Vendor (EDB).
CVSS VectorVendor: EDB
DescriptionCVE.org
During IMPORT FOREIGN SCHEMA, mysql_fdw copies column metadata returned by the remote MySQL server into the CREATE FOREIGN TABLE statements it runs locally without quoting it. The COLUMN_DEFAULT value is placed directly in the DEFAULT clause, and the name of the generated ENUM type is inserted unquoted. A malicious or compromised MySQL server, or an attacker who can tamper with the connection, can return crafted information_schema metadata and run arbitrary SQL in the local PostgreSQL session of the user who runs IMPORT FOREIGN SCHEMA. The issue is fixed in mysql_fdw 2.10.0. From mysql_fdw 2.10.0, mysql_fdw quotes these values before building the statements.
Articles & Coverage 2
Executive ViewAI
A high-severity SQL injection vulnerability in mysql_fdw (CVE-2026-62154) allows a rogue MySQL server to execute malicious SQL within the local PostgreSQL session of users who perform IMPORT FOREIGN SCHEMA. This affects organizations using the extension in PostgreSQL environments, but only when a user actively connects to an untrusted server, making it a targeted risk rather than a widespread default threat. Leadership should prioritize patching because the flaw could lead to unauthorized database access or data compromise, though no active exploitation has been observed.
Apply vendor patch.
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-135561
GHSA-x5jx-6546-4m83
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB