Skip to main content

mysql_fdw EUVDEUVD-2026-135558

| CVE-2026-62151 MEDIUM
SQL Injection (CWE-89)
2026-11-25 EDB GHSA-373c-36hr-jp62
5.8
CVSS 4.0 · Vendor: EDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with SELECT on a foreign table
  2. Exploit
    Supply literal ending in 0x5C byte
  3. Execution
    Escaping backslash absorbed, quote left unescaped
  4. Impact
    Execute arbitrary SQL on remote MySQL as user mapping

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 all of: (1) a mysql_fdw remote connection configured with a multi-byte character set such as GBK, SJIS, or Big5; (2) MySQL's default backslash escaping in effect (i.e., sql_mode WITHOUT NO_BACKSLASH_ESCAPES, the pre-2.10.0 behavior); and (3) an authenticated PostgreSQL user who holds at least SELECT on a mysql_fdw foreign table so that a crafted string constant can be pushed down into an ordinary WHERE-clause literal. Limiting factors: it does not apply to single-byte/ASCII-safe charsets or to sessions already running with NO_BACKSLASH_ESCAPES, authentication to PostgreSQL is required (not remote-unauthenticated), and from mysql_fdw 2.10.0 the fix removes the condition entirely by forcing NO_BACKSLASH_ESCAPES and doubling single quotes; the vendor states upgrading is the fix.

Impact

This is a genuine but conditional server-side SQL injection (CWE-89), rated medium by the supplied CVSS 4.0 vector (5.8, CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H). The signals are internally consistent and point away from emergency status: AV:N makes it network-reachable, but AT:P reflects a real attack requirement (the remote connection must use a multi-byte character set such as GBK/SJIS/Big5 AND MySQL's default backslash escaping must be active), and PR:L reflects that the attacker must already be an authenticated PostgreSQL user holding SELECT on a mysql_fdw foreign table. Impact is entirely on the subsequent system: VC/VI/VA are N (the PostgreSQL/FDW host itself is not directly compromised) while SC/SI/SA are H because arbitrary SQL runs on the remote MySQL server under the user mapping's credentials. No EPSS score, no CISA KEV listing, and no PoC/exploit reference are present in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation. The vuln.today Decision label is this_month (not act_now/emergency), which aligns with a patched, medium-severity, precondition-gated flaw. Net: prioritize for scheduled patching of affected deployments that actually use multi-byte charsets, rather than as a drop-everything emergency; the headline risk is privilege escalation within MySQL (an authenticated low-privilege PostgreSQL user leveraging the user-mapping account) rather than mass remote compromise.

Exploit ScenarioDerived

An authenticated PostgreSQL user holding only SELECT on a mysql_fdw foreign table - where the remote connection uses a multi-byte charset like GBK and MySQL backslash escaping is in effect - supplies a crafted WHERE-clause value whose trailing byte is 0x5C. The multi-byte lead byte absorbs the escaping backslash so the following closing quote is left unescaped, letting the attacker break out of the string literal and run arbitrary SQL on the remote MySQL server with the user mapping's credentials. No public exploit identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 25, 2026

SQL injection in mysql_fdw before 2.10.0 allows an authenticated PostgreSQL user with SELECT on a foreign table to execute arbitrary SQL on the linked MySQL server under the credentials of the user mapping. The flaw requires the mysql_fdw connection to use a multi-byte character set such as GBK, SJIS, or Big5 while MySQL's default backslash escaping is active; values in pushed-down WHERE-clause literals can then absorb the escape and leave a quote unescaped. Vendor-released patch 2.10.0 fixes this by forcing NO_BACKSLASH_ESCAPES and doubling single quotes; no public exploit identified at time of analysis.

RemediationAI

Upgrade mysql_fdw to 2.10.0 or later; this is the complete vendor fix and it forces NO_BACKSLASH_ESCAPES into the remote session sql_mode while escaping string literals by doubling single quotes (advisory: https://www.enterprisedb.com/docs/security/advisories/cve202662151/; release: https://github.com/EnterpriseDB/mysql_fdw/releases/tag/REL-2_10_0). If upgrading cannot be done immediately, ensure mysql_fdw remote MySQL sessions run with NO_BACKSLASH_ESCAPES where the deployment allows it and avoid multi-byte character sets such as GBK, SJIS, or Big5 for mysql_fdw connections that cannot enforce that sql_mode; both reduce the vulnerable condition but do not replace the patch. As a secondary containment, restrict SELECT privileges on mysql_fdw foreign tables to users who require them, accepting that this limits legitimate reporting and does not remove the risk for those still granted access.

Affected VersionsENISA

MySQL Foreign Data Wrapper (mysql_fdw) 0 <2.10.0

Affected Packages

euvd mysql_foreign_data_wrapper_mysql_fdw fix: 2.10.0

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 translates PostgreSQL queries into SQL sent to a remote MySQL server. The vulnerable versions construct string literals with an escaping routine that is not character-set aware; in connections using multi-byte charsets (GBK, SJIS, Big5) and MySQL's default backslash escaping (sql_mode without NO_BACKSLASH_ESCAPES), a crafted value ending in byte 0x5C consumes the escaping backslash and leaves the following single quote unescaped. This is CWE-89 SQL injection in pushed-down string constants, including ordinary WHERE-clause literals, so a PostgreSQL user with only SELECT on a foreign table can break out of the literal and run SQL on the remote MySQL server using the user mapping credentials. The CVSS vector requires PR:L (authenticated) and AT:P (specific attack requirements: multi-byte charset plus default backslash escaping); versions before 2.10.0 are affected. The fix in 2.10.0 forces NO_BACKSLASH_ESCAPES into the remote session sql_mode and escapes literals by doubling single quotes.

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

Vendor (EDB) PRIMARY 5.8 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
vuln.today AI 8.5 HIGH

Network-reachable but AC:H for the required multi-byte-charset/backslash-escaping condition; PR:L for an authenticated SELECT user; S:C with C/I/A:H because arbitrary SQL executes on the separate remote MySQL server.

3.1 AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H

Primary rating from Vendor (EDB).

CVSS VectorVendor: EDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.6%
Top 55% exploitable
Prevalence
Low
niche PostgreSQL-to-MySQL foreign data wrapper extension, limited deployment footprint
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +29
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

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

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

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

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy