Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
High 7.5CVE-2026-62154

mysql_fdw: SQL injection via malicious MySQL server metadata during IMPORT FOREIGN SCHEMA

Published 25/11/2026 · Updated 25/11/2026 · EnterpriseDB MySQL Foreign Data Wrapper (mysql_fdw)

Summary

During IMPORT FOREIGN SCHEMA, the mysql_fdw PostgreSQL extension copies column metadata returned by the remote MySQL server into locally executed CREATE FOREIGN TABLE statements without quoting. The COLUMN_DEFAULT value is placed directly into the DEFAULT clause, and the generated ENUM type name is inserted unquoted (CWE-89, SQL injection).

The attack is network-based, low complexity and requires no authentication, but depends on preconditions: the attacker must control or compromise the MySQL server or be able to tamper with the connection, and a user must actively run IMPORT FOREIGN SCHEMA. CVSS 4.0 score is 7.5 (high).

Successful exploitation runs arbitrary SQL in the local PostgreSQL session of the user performing the import, with high impact on confidentiality, integrity and availability. The vulnerability is not listed in the CISA KEV catalog.

Who is affected

Organizations running PostgreSQL with mysql_fdw versions earlier than 2.10.0 that import schemas from MySQL servers.

What to do

  1. Upgrade mysql_fdw to version 2.10.0 or later, which quotes these values before building the statements.
  2. Check the installed extension version (e.g. SELECT extversion FROM pg_extension WHERE extname = 'mysql_fdw';) on all PostgreSQL instances.
  3. Until upgraded, avoid running IMPORT FOREIGN SCHEMA against MySQL servers that are not fully trusted, especially as a highly privileged user.
  4. Secure the connection to the MySQL server (e.g. TLS) to prevent traffic tampering.
  5. Review the official EnterpriseDB advisory (cve202662154) and the REL-2_10_0 release notes.

Affected products and versions

EnterpriseDB MySQL Foreign Data Wrapper (mysql_fdw)< 2.10.0Fixed in: 2.10.0

CVSS vector, explained

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

Attack vector
Network (from the internet)
Attack complexity
Low
Attack requirements
Present
Privileges required
None (no login)
User interaction
Active
Confidentiality
High impact
Integrity
High impact
Availability
High impact

Weakness type (CWE)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.