CVE-2026-62157 — EnterpriseDB MongoDB Foreign Data Wrapper (mongo fdw)
One of 2 EnterpriseDB MongoDB Foreign Data Wrapper (mongo fdw) vulnerabilities published together by NVD: our article covers all of them.
DatabasesVulnerabilitiesSummary
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.
Severity breakdown
Medium · 5.3
An attacker with a normal user account can exploit this over the network, without any user action.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Special conditions
- none
- Login needed
- yes, a normal user account
- User action needed
- no
- Impact
- low on confidentiality and availability, none on integrity
- Impact on other systems
- none
Weakness
- CWE-125: Out-of-bounds Read
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| EnterpriseDB MongoDB Foreign Data Wrapper (mongo fdw) | < 5.6.0 | 5.6.0 |
References by type
Patches and fixed releases
Other references
Affected
- EnterpriseDB MongoDB Foreign Data Wrapper (mongo fdw)
What to do
- Follow the vendor advisory and the references below for fixed versions and workarounds.
Frequently asked questions
What is CVE-2026-62157?
mongofdw 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. Weakness type: Out-of-bounds Read (CWE-125).
How severe is CVE-2026-62157?
CVE-2026-62157 has a CVSS 4.0 base score of 5.3 (medium), from the CNA. An attacker with a normal user account can exploit this over the network, without any user action.
Is CVE-2026-62157 being exploited?
Not as far as is known: CVE-2026-62157 is not in CISA's Known Exploited Vulnerabilities catalog as of November 26, 2026. EPSS estimates a 0.6% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-62157?
EnterpriseDB MongoDB Foreign Data Wrapper (mongo fdw) < 5.6.0 (fixed in 5.6.0).
How do I fix CVE-2026-62157?
Update to a fixed release: EnterpriseDB MongoDB Foreign Data Wrapper (mongo fdw) 5.6.0.