Skip to main content

mysql_fdw EUVDEUVD-2026-135559

| CVE-2026-62152 MEDIUM
Improper Privilege Management (CWE-269)
2026-11-25 EDB GHSA-gv24-j96j-h75w
5.8
CVSS 4.0 · Vendor: EDB
View

Attack ChainAIDerived

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

  1. Access
    Hold PostgreSQL role with mysql_fdw USAGE
  2. Delivery
    Set init_command or ssl_key/mysql_default_file option
  3. Exploit
    Arbitrary SQL runs on remote MySQL at connect
  4. Execution
    Executes under other users' shared-server mappings
  5. Impact
    Read PostgreSQL host files and redirect connection

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V8 - Authorization Least privilege enforcement
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an authenticated PostgreSQL role (PR:L) that has been granted USAGE on the mysql_fdw foreign data wrapper; it is not remote-unauthenticated. The attacker must be able to set the security-sensitive options init_command, mysql_default_file, ssl_key, ssl_cert, ssl_ca or ssl_capath on a foreign server or user mapping on a pre-2.10.0 mysql_fdw install. The cross-user init_command impact specifically requires a SHARED foreign server where other users' mappings also open connections (this maps to the CVSS AT:P attack requirement); the server-side file-read and connection-redirection impacts need only the attacker's own mapping. Limiting factors: the vulnerability is closed in mysql_fdw 2.10.0, which restricts these options to superusers, and risk is confined to deployments that expose the wrapper to non-superuser roles - single-tenant or superuser-only installs are not meaningfully exposed.

Impact

This is a medium-severity privilege-management flaw (CVE-2026-62152, CVSS 4.0 base 5.8, CWE-269), not a top-priority emergency. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:L/UI:N) confirms the attacker must already hold a low-privilege authenticated PostgreSQL role (PR:L) with USAGE on the mysql_fdw foreign data wrapper, and that a specific attack requirement exists (AT:P) - namely a shared foreign server where other users' mappings also connect, needed for the cross-user init_command abuse. The vector models low direct impact to the PostgreSQL server (VC:L/VI:N/VA:N) but high impact to subsequent systems (SC:H/SI:H/SA:H), reflecting arbitrary SQL execution against the remote MySQL server and server-side file reads. Exploitation status is 'no public exploit identified at time of analysis' - there is no KEV listing, no POC reference, and no EPSS score in the input, so there is no signal of active or widespread exploitation. The vuln.today decision label is 'this_month' (not act_now/emergency), consistent with an authenticated, precondition-dependent issue rather than a drive-by remote. No signals conflict here; the limiting factor is the PR:L requirement - an attacker needs an existing database role with FDW USAGE, which bounds real-world risk to multi-tenant PostgreSQL deployments that expose mysql_fdw to non-superusers.

Exploit ScenarioDerived

In a shared-hosting or multi-tenant PostgreSQL deployment, a non-superuser role that holds USAGE on the mysql_fdw wrapper sets init_command on a foreign server or user mapping; this SQL then executes on the remote MySQL server at every connection, including connections opened under other users' mappings to that shared foreign server. The same role can set ssl_key, ssl_cert, ssl_ca, ssl_capath or mysql_default_file to filenames on the PostgreSQL host, causing server-side reads of local files and redirection of the MySQL connection. No public exploit code is identified; exploitation requires an existing low-privilege database role rather than remote unauthenticated access.

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

In mysql_fdw before 2.10.0, a PostgreSQL role that holds only USAGE on the mysql_fdw foreign data wrapper - not superuser rights - can supply security-sensitive connection options that the extension should have reserved for superusers. Such a role can set init_command, which executes arbitrary SQL against the remote MySQL server on every connection opened through a shared foreign server, including connections made with other users' mappings, and can point mysql_default_file, ssl_key, ssl_cert, ssl_ca and ssl_capath at files on the PostgreSQL server host, enabling server-side file reads and redirection of the connection to a host of the attacker's choosing. The flaw is a privilege-management weakness (CWE-269) rated medium (CVSS 4.0 base 5.8; independently assessed CVSS 3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N), requiring an already-authenticated role with wrapper USAGE; exploitation is not confirmed in the wild and no public exploit has been identified at time of analysis, and mysql_fdw 2.10.0 restricts all six options to superusers.

RemediationAI

Vendor-released patch: upgrade to mysql_fdw 2.10.0 (REL-2_10_0), which restricts init_command, mysql_default_file, ssl_key, ssl_cert, ssl_ca and ssl_capath to superusers; see the advisory at https://www.enterprisedb.com/docs/security/advisories/cve202662152/ and the release at https://github.com/EnterpriseDB/mysql_fdw/releases/tag/REL-2_10_0. Before upgrading, audit existing foreign servers and user mappings for values of these six options, since the release notes state that foreign servers using the restricted options and created by non-superusers will be rejected when altered and must be re-created or altered by a superuser; expect transient failures for those servers until an administrator rebuilds them. The same release also always adds NO_BACKSLASH_ESCAPES to the remote session sql_mode and re-imports foreign schema column defaults as string literals, so re-apply expression defaults such as CURRENT_TIMESTAMP after import. Where upgrading cannot be done immediately, revoke USAGE on the mysql_fdw wrapper from non-superuser roles (or drop the wrapper from roles that do not need it), accepting that those roles can no longer create or query mysql_fdw foreign tables, and replace shared foreign servers used by multiple roles with per-role servers so no mapping can influence another user's connections; also review grants on existing servers and mappings, because a role that already set init_command or file-path options keeps that configuration until a superuser changes it.

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 the EnterpriseDB foreign data wrapper that lets PostgreSQL and EDB Postgres Advanced Server query MySQL tables through the SQL/MED foreign data wrapper API. Connection parameters are supplied as key/value options on foreign servers and user mappings, and they are funneled through the extension's validator and then used when the wrapper opens a libmysqlclient session. The root cause is improper privilege management (CWE-269): the option validator accepted init_command, mysql_default_file, ssl_key, ssl_cert, ssl_ca and ssl_capath from any role with USAGE on the wrapper, even though those options influence what SQL runs on the remote server and which local files and TLS material the backend reads. Because init_command is applied at connection establishment, its effect is not scoped to the option-setter's own queries when other users' mappings open connections on the same shared foreign server, which is the basis for the CVSS 4.0 AT:P requirement and the scope change (S:C) in the independent assessment. The affected CPE is cpe:2.3:a:enterprisedb:mysql_foreign_data_wrapper_(mysql_fdw):*:*:*:*:*:*:*. Version 2.10.0 changes the validator so only superusers may set these six options, and its release notes also state that foreign servers created by non-superusers with the now-restricted options will be rejected when altered.

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:L/VI:N/VA:N/SC:H/SI:H/SA:H
vuln.today AI 9.6 CRITICAL

Attacker needs a low-privilege role with FDW USAGE (PR:L) reachable over the DB connection (AV:N/AC:L); impact crosses to the remote MySQL server and host files (S:C) via arbitrary SQL and file reads (C:H/I:H).

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/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
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

DescriptionCVE.org

mysql_fdw accepts several security-sensitive connection options from roles that are not superusers. A role with USAGE on the mysql_fdw foreign data wrapper can set init_command, which runs arbitrary SQL on the remote MySQL server at every connection, including connections made with other users' mappings on a shared foreign server. The same role can set mysql_default_file, ssl_key, ssl_cert, ssl_ca and ssl_capath, which name files read from the PostgreSQL server host, allowing server-side file reads and connection redirection. The issue is fixed in mysql_fdw 2.10.0. From mysql_fdw 2.10.0, only superusers can set init_command, mysql_default_file, ssl_key, ssl_cert, ssl_ca and ssl_capath.

Threat Intelligence Overview

EPSS Score
0.6%
Top 59% exploitable
Prevalence
Low
niche PostgreSQL foreign-data-wrapper extension, limited to MySQL-integration deployments
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

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

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