Read the docs

SQL injection in mysql_fdw through character set escaping bypass

Priority LOW 27CWE-89Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Attack requirements
Present
Impact type
SQL injection
Confidentiality · integrity · availability
None · None · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-89.

Summary

EnterpriseDB MySQL Foreign Data Wrapper (mysql_fdw) before 2.10.0 escapes string literals with a routine that is not character-set aware. With multi-byte character sets such as GBK, SJIS or Big5 and MySQL's default backslash escaping, a crafted value ending in byte 0x5C leaves a quote unescaped and breaks out of the literal (CWE-89). An authenticated user with only SELECT on a foreign table can run arbitrary SQL on the remote MySQL server using the user mapping's credentials.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00644 45th percentileScored 2026-11-30
Fix Fixed MySQL Foreign Data Wrapper (mysql_fdw) (EnterpriseDB): 2.10.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
EnterpriseDBMySQL Foreign Data Wrapper (mysql_fdw)before 2.10.02.10.0Patch availableCNA
  • MySQL Foreign Data Wrapper (mysql_fdw) VendorEnterpriseDB Affected before 2.10.0 Fixed in 2.10.0 Patch available CNA

Remediation

Update EnterpriseDB mysql_fdw to version 2.10.0, which forces NO_BACKSLASH_ESCAPES into the session sql_mode and escapes string literals by doubling single quotes.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

  • Fix · CNA MySQL Foreign Data Wrapper (mysql_fdw) (EnterpriseDB) Fixed in 2.10.0

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    EnterpriseDB MySQL Foreign Data Wrapper (mysql_fdw) 2.10.0

    4 records Highest priority Priority LOW 4 LOW

    Other records, highest priority first

    • TI-2026-98316 mysql_fdw IMPORT FOREIGN SCHEMA lets a malicious MySQL server run SQLPriority LOW 36
    • TI-2026-98315 SQL injection in mysql_fdw via ANALYZE and IMPORT FOREIGN SCHEMAPriority LOW 30
    • TI-2026-98314 mysql_fdw lets non-superusers run SQL and read server filesPriority LOW 27

Timeline

  1. 2026-11-25 Threatist record created from CVE-2026-62151
  2. 2026-11-25 CISA SSVC decision points changed
  3. 2026-11-25 Alias added: GHSA-373c-36hr-jp62

References

  • TI-2023-21738 An issue was discovered in EnterpriseDB Postgres Advanced Server (EPAS) before 11.21.32… CVSS 3.1CRITICAL 9.8
  • TI-2026-95912 Untrusted search path in Postgres Enterprise Manager allows superuser SQL CVSS 4.0CRITICAL 9.4
  • TI-2026-95911 Postgres Enterprise Manager agents can change other agents' jobs CVSS 4.0CRITICAL 9.4
  • TI-2026-95910 PEM agent role grants file read and write on the PEM server host CVSS 4.0CRITICAL 9.4
  • TI-2023-21739 An issue was discovered in EnterpriseDB Postgres Advanced Server (EPAS) before 11.21.32… CVSS 3.1HIGH 8.8
  • TI-2026-37400 When applying replicated changes for a row that is missing one or more columns, pglogical… CVSS 4.0CRITICAL 9.0
See all 41 →

Sources