Skip to main content

mongo_fdw EUVDEUVD-2026-135564

| CVE-2026-62157 MEDIUM
Out-of-bounds Read (CWE-125)
2026-11-25 EDB GHSA-58x3-p638-vfwc
5.3
CVSS 4.0 · Vendor: EDB
View

Attack ChainAIDerived

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

  1. Access
    Obtain query access to mongo_fdw foreign table
  2. Exploit
    Supply short _id value or predicate
  3. Execution
    Trigger out-of-bounds read in ObjectId conversion
  4. Impact
    Crash backend or leak adjacent memory into MongoDB query

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

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

Exploitation Conditions

Requires (1) a deployed PostgreSQL instance using the mongo_fdw extension with at least one MongoDB foreign table, and (2) a user with privileges to supply an _id value or a predicate referencing _id on that foreign table (hence PR:L, authenticated). The specific trigger is a value shorter than the fixed read length: a bytea _id under 12 bytes, or a name-typed value or JSON $oid field under 24 hexadecimal characters, which causes libbson to read past the input end. Limiting factors: the attacker must already have query/insert access to a mongo_fdw foreign table, so this is not reachable by fully unauthenticated external actors; impact is limited to backend crash (DoS) or disclosure of adjacent process memory, not code execution or data modification. Deployments not using mongo_fdw are unaffected. The only complete fix stated by the vendor is upgrading to mongo_fdw 5.6.0.

Impact

This is a medium-severity (CVSS 4.0 base 5.3) out-of-bounds read (CWE-125) in mongo_fdw, a PostgreSQL foreign data wrapper. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:L) indicates network reachability with low attack complexity and no special attack requirements, but PR:L means some level of authentication/privilege is required - specifically the ability to supply an _id value or predicate on a foreign table. Impact is bounded: low confidentiality (adjacent backend memory may leak into the query sent to MongoDB) and low availability (a crash of the PostgreSQL backend); no integrity impact. There is no CISA KEV listing and no EPSS score or public exploit reference in the provided data, so there is no evidence of active or widespread exploitation; the vuln.today decision label is 'this_month', i.e. a prioritized-but-not-emergency fix. The signals are internally consistent: a legitimately-authenticated database user who can issue queries against a mongo_fdw foreign table is the realistic threat, making this more a trust-boundary/memory-safety hardening issue than a mass-exploitable remote flaw. Treat it as a real but moderate priority - patch on a normal cadence rather than as an emergency.

Exploit ScenarioDerived

An authenticated PostgreSQL user who has access to a mongo_fdw foreign table supplies a short _id value (a bytea shorter than 12 bytes, or a name/JSON $oid value shorter than 24 hex characters) in an INSERT, query predicate, or filter. libbson reads past the end of the short input, crashing the PostgreSQL backend or splicing adjacent backend memory into the ObjectId sent to MongoDB, potentially disclosing that memory. No public exploit code is identified in the provided data.

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

An out-of-bounds read in mongo_fdw, EnterpriseDB's PostgreSQL foreign data wrapper for MongoDB, allows an authenticated user with access to a MongoDB foreign table to supply a short _id value that libbson reads past the end of its input buffer. The flaw can crash the PostgreSQL backend or leak adjacent process memory into the query sent to MongoDB, but the assessed impact is limited to low confidentiality and availability effects rather than code execution or data modification. No public exploit has been identified at time of analysis; mongo_fdw 5.6.0 is the vendor-released fix that restricts accepted values to valid 24-character hexadecimal ObjectIds and 12-byte bytea values.

RemediationAI

Upgrade mongo_fdw to 5.6.0, the vendor-released patch; the release enforces valid 24-character hexadecimal ObjectIds and 12-byte bytea values, so shorter _id inputs are no longer read past their length. The vendor advisory at https://www.enterprisedb.com/docs/security/advisories/cve202662157/ and the release notes at https://github.com/EnterpriseDB/mongo_fdw/releases/tag/REL-5_6_0 document the fix, and the independent assessment states that upgrading to 5.6.0 is the only complete fix stated by the vendor. No other vendor workaround is specified in the available data; because the flaw requires an authenticated user with privileges to supply _id values or predicates on a mongo_fdw foreign table, restricting those privileges can reduce exposure while an upgrade is pending, but it does not address the out-of-bounds read itself.

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 a PostgreSQL foreign data wrapper that maps MongoDB collections to foreign tables, and MongoDB ObjectIds are 12-byte BSON values. In affected versions, the _id conversion path uses libbson functions that read a fixed number of bytes without first checking the supplied length: 12 bytes for a bytea _id, and 24 characters for name-typed values and JSON $oid fields. A shorter value therefore causes an out-of-bounds read (CWE-125) past the end of the input, which can crash the PostgreSQL backend or copy adjacent process memory into the query sent to MongoDB. The reviewed CPE identifies EnterpriseDB mongodb_foreign_data_wrapper_(mongo_fdw); the independent assessment records CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L, confirming that an authenticated user with privileges on the foreign table is required. The trigger is a value shorter than the fixed read length, and the issue is fixed in 5.6.0 by enforcing valid 24-character hexadecimal ObjectIds and 12-byte bytea values.

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:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.4 MEDIUM

Network-reachable via SQL with low complexity, but requires an authenticated user able to supply an _id/predicate (PR:L); impact is limited memory disclosure (C:L) and backend crash (A:L), no integrity effect.

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

DescriptionCVE.org

mongo_fdw converts _id values to 12-byte MongoDB ObjectIds with libbson functions that read a fixed number of bytes without checking the input length: 12 bytes for a bytea _id, and 24 characters for name-typed values and $oid fields in JSON. A shorter value causes a read past the end of the input, which can crash the PostgreSQL backend or include adjacent memory in the query sent to MongoDB. Any user who can supply an _id value or predicate on a foreign table can trigger it. The issue is fixed in mongo_fdw 5.6.0. From mongo_fdw 5.6.0, mongo_fdw accepts only valid 24-character hexadecimal ObjectIds and 12-byte bytea values.

Threat Intelligence Overview

EPSS Score
0.6%
Top 56% exploitable
Prevalence
Low
niche PostgreSQL-to-MongoDB foreign data wrapper extension, specialized deployments only
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

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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