CVE-2026-62157
Received Received - Intake

Heap Buffer Overflow in mongo_fdw Extension

Vulnerability report for CVE-2026-62157, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-25

Last updated on: 2026-11-25

Assigner: EnterpriseDB Corporation

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-25
Last Modified
2026-11-25
Generated
2026-11-25
AI Q&A
2026-11-25
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
EnterpriseDB MongoDB Foreign Data Wrapper (mongo_fdw) From 0 (inc) to 5.6.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

mongo_fdw has a flaw where it converts _id values to MongoDB ObjectIds without checking input length. It reads fixed bytes (12 for bytea, 24 for JSON) which can cause crashes or expose adjacent memory if shorter values are provided. Any user with access to supply _id values or query foreign tables can trigger this issue.

Detection Guidance

Check the version of mongo_fdw installed on your PostgreSQL server. If it is below 5.6.0, the system is vulnerable. Run: SELECT * FROM pg_available_extensions WHERE name = 'mongo_fdw'; to verify the installed version.

Impact Analysis

This vulnerability can crash PostgreSQL backends or leak sensitive memory. Attackers with database access could manipulate queries to MongoDB, potentially accessing unauthorized data or causing denial of service. The impact depends on user privileges and MongoDB configuration.

Mitigation Strategies

Upgrade mongo_fdw to version 5.6.0 or later. This version enforces validation of _id values to prevent memory corruption or query manipulation. Follow the official release notes for installation instructions.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-62157. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...