Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain query access to mongo_fdw foreign table
-
ExploitSupply short _id value or predicate
-
ExecutionTrigger out-of-bounds read in ObjectId conversion
-
ImpactCrash 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (EDB).
CVSS VectorVendor: EDB
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
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
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
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
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-135564
GHSA-58x3-p638-vfwc
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB