CVE-2026-62151
Received Received - Intake

SQL Injection in mysql_fdw Foreign Data Wrapper

Vulnerability report for CVE-2026-62151, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-25

Last updated on: 2026-11-25

Assigner: EnterpriseDB Corporation

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-25
Last Modified
2026-11-25
Generated
2026-11-25
AI Q&A
2026-11-25
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
EnterpriseDB MySQL Foreign Data Wrapper (mysql_fdw) From 0 (inc) to 2.10.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-89 The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

mysql_fdw is a PostgreSQL extension that allows querying remote MySQL servers. This vulnerability occurs when the connection uses a multi-byte character set like GBK, SJIS, or Big5. The escaping routine for string literals is not aware of the character set, allowing a crafted value ending with 0x5C to bypass escaping and unescape a quote. This lets an authenticated user with SELECT privileges on a foreign table inject arbitrary SQL into the remote MySQL server using the user mapping credentials.

Detection Guidance

To detect this vulnerability, check the version of mysql_fdw installed on your PostgreSQL server. If it is below 2.10.0, the system is vulnerable. Run: SELECT extversion FROM pg_extension WHERE extname = 'mysql_fdw';

Impact Analysis

An attacker could exploit this to run arbitrary SQL commands on the remote MySQL server, potentially leading to unauthorized data access, modification, or deletion. Since the attack requires only SELECT privileges on a foreign table, the risk is significant for systems using mysql_fdw with multi-byte character sets.

Compliance Impact

This vulnerability could lead to unauthorized data access or manipulation, violating confidentiality and integrity requirements in GDPR and HIPAA. Compliance may be compromised if sensitive data is exposed or altered due to the SQL injection risk.

Mitigation Strategies

Upgrade mysql_fdw to version 2.10.0 or later. This version forces NO_BACKSLASH_ESCAPES into the session sql_mode and escapes string literals by doubling single quotes, preventing the vulnerability.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-62151. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...