Skip to main content

mongo_fdw CVE-2026-62155

| EUVDEUVD-2026-135562 MEDIUM
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-11-25 EDB GHSA-68g8-hj67-cq52
5.3
CVSS 4.0 · Vendor: EDB
View

Attack ChainAIDerived

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

  1. Access
    Authenticate with USAGE on foreign server
  2. Delivery
    Inject @/metacharacters into user-mapping username or password
  3. Exploit
    mongo_fdw builds unencoded mongodb:// URI
  4. Execution
    Connection redirected to attacker-controlled host
  5. Impact
    Capture credentials and man-in-the-middle MongoDB traffic

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Exploitation Conditions

Requires an existing PostgreSQL account: a role that is NOT a superuser but has been granted USAGE on a mongo_fdw foreign server, plus the ability to set the username/password options in its own user mapping (server-level options such as address, database and replica set are injectable the same way where the role can set them). The injected value must contain URI metacharacters (@ : / ?

& =) to alter the mongodb:// URI structure. Affected: mongo_fdw before 5.6.0. Limiting factors: exploitation is authenticated and privilege-gated (no anonymous/remote-unauthenticated path), needs the mongo_fdw extension installed and a foreign server the attacker can map against, and is fully closed by upgrading to 5.6.0, which percent-encodes credentials and rejects metacharacters in other option values.

Impact

This is a medium-severity, authenticated injection flaw (CWE-74) rather than a drive-by critical. The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N, 5.3) is internally consistent with the description: PR:L matches the requirement that the attacker already hold a PostgreSQL role with USAGE on the foreign server and control over its own user mapping, so this is not remote-unauthenticated. The limited confidentiality/integrity impact (VC:L/VI:L) aligns with connection redirection, credential capture and MITM against the MongoDB connection rather than full server compromise, and VA:N/SA:N/SI:N correctly reflect no availability or downstream-system impact. No EPSS score is provided and the CVE is not in CISA KEV, so there is no signal of widespread or active exploitation; no POC reference is supplied either. The vendor decision label is 'this_month' (not act_now/emergency), which matches a patchable, privilege-gated issue. Net: a legitimate issue to remediate on a normal patch cadence, not an emergency - its real-world risk is bounded by the need for an existing low-privilege database foothold with USAGE on the affected foreign server. No signals are strongly conflicting; the main unknown is exploitation-probability data (EPSS absent).

Exploit ScenarioDerived

A non-superuser PostgreSQL role that has been granted USAGE on a mongo_fdw foreign server edits its own user mapping, placing an '@' and an attacker-controlled host inside the username or password option value. Because mongo_fdw (before 5.6.0) concatenates these values into the mongodb:// URI without percent-encoding, the metacharacters are parsed as URI structure, redirecting the outbound connection to the attacker's host where credentials can be captured or the traffic man-in-the-middled. No public exploit identified at time of analysis; the attack requires the attacker to already hold the USAGE grant (authenticated, PR:L).

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

mongo_fdw builds its mongodb:// connection URI by splicing option values in without percent-encoding, so a value containing URI metacharacters such as @ : / ?

& = is reinterpreted as URI structure and can redirect the connection to an attacker-controlled host, capturing credentials or enabling man-in-the-middle. Only roles that are not superusers but hold USAGE on a mongo_fdw foreign server - and can set the username/password options in their own user mapping, or server-level options such as address, database and replica set where they are permitted to do so - can trigger this, making it an authenticated, privilege-gated injection (CWE-74) rather than an anonymous path. The flaw is fixed in mongo_fdw 5.6.0, which builds the URI through the libmongoc URI API and rejects metacharacters in non-credential options; no public exploit code or confirmed active exploitation was identified at time of analysis.

RemediationAI

Upgrade mongo_fdw to 5.6.0, which is the vendor-released patch: it assembles the connection URI via the libmongoc URI API, percent-encodes credentials and rejects URI metacharacters in the address, database and replica set options (advisory https://www.enterprisedb.com/docs/security/advisories/cve202662155/, release https://github.com/EnterpriseDB/mongo_fdw/releases/tag/REL-5_6_0). Note that 5.6.0 also removes PostgreSQL 13 support, so clusters on PostgreSQL 13, Postgres Extended 13 or EPAS 13 must be moved to a supported major version before or alongside the extension upgrade. Where upgrading cannot happen immediately, the exposure is bounded by grants rather than by the URI parser: audit which non-superuser roles hold USAGE on mongo_fdw foreign servers and which of those can set username, password, address, database or replica set options in their own user mappings, and revoke USAGE on the foreign server and the ability to set those options from roles that do not need them - the trade-off is that legitimate per-role MongoDB credentials and alternate server targets configured through user mappings will stop working for those roles. The vendor's complete fix is the 5.6.0 upgrade; option-level grants reduce but do not eliminate the attack surface for roles that genuinely require the capability.

Affected VersionsENISA

MongoDB Foreign Data Wrapper (mongo_fdw) 0 <5.6.0

Affected Packages

euvd mongodb_foreign_data_wrapper_mongo_fdw fix: 5.6.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

mongo_fdw is EnterpriseDB's MongoDB Foreign Data Wrapper for PostgreSQL, PostgreSQL Extended and EDB Postgres Advanced Server; it lets SQL queries reach a MongoDB server through a foreign server and per-role user mapping. The underlying defect is a classic injection class (CWE-74) at the string-construction layer: the extension assembled the mongodb:// connection string by concatenating option values verbatim, so URI syntax characters embedded in an option were parsed as delimiters and components rather than data. Because the URI is effectively the trust boundary for which MongoDB endpoint receives the driver's credentials, an injected '@' or '?' can terminate the authority section early and repoint the driver at a different host - the credential-capture and MITM consequence follows from the driver authenticating to whatever endpoint the URI names. The trigger is therefore the presence of URI metacharacters in an option value supplied through the foreign server or user mapping, and the exposure is bounded by the privileges required to set those options. The 5.6.0 fix moves URI assembly onto the libmongoc URI API, which percent-encodes credentials, and explicitly rejects URI metacharacters in the remaining option values (address, database, replica set), closing the injection surface rather than relying on escaping at the call site.

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.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.4 MEDIUM

Attacker needs an existing USAGE grant and control of its own user mapping, so PR:L (not PR:N); network-reachable DB and straightforward string injection give AV:N/AC:L; impact is credential capture/MITM (C:L/I:L), no availability loss.

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

Primary rating from Vendor (EDB).

CVSS VectorVendor: EDB

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

DescriptionCVE.org

mongo_fdw builds the mongodb:// connection URI by inserting option values without percent-encoding them, so URI metacharacters (@ : / ?

& =) in a value are parsed as part of the URI structure. A role that is not a superuser but has USAGE on a foreign server can set the username and password options in its own user mapping. An @ or other metacharacter in those values can point the connection at a host the attacker controls, allowing connection redirection, credential capture and man-in-the-middle attacks. Server-level options such as the address, database and replica set can be injected the same way. The issue is fixed in mongo_fdw 5.6.0. From mongo_fdw 5.6.0, mongo_fdw builds the URI with the libmongoc URI API, which encodes credentials, and rejects URI metacharacters in the other option values.

Threat Intelligence Overview

EPSS Score
0.6%
Top 56% exploitable
Prevalence
Low
niche PostgreSQL extension bridging to MongoDB; limited, specialized 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

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

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

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