Read the docs

Out-of-bounds read in mongo_fdw when building MongoDB ObjectIds

Priority LOW 25CWE-125Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
—
Confidentiality · integrity · availability
Low · None · Low
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA.

Summary

EnterpriseDB MongoDB Foreign Data Wrapper (mongo_fdw) before 5.6.0 has an out-of-bounds read (CWE-125) when it converts _id values to MongoDB ObjectIds. The conversion reads a fixed number of bytes without checking the input length, so a shorter bytea, name or $oid value makes it read past the end of the input. An attacker who can supply an _id value or predicate on a foreign table can crash the PostgreSQL backend or include adjacent memory in the query sent to MongoDB.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00621 44th percentileScored 2026-11-30
Fix Fixed MongoDB Foreign Data Wrapper (mongo_fdw) (EnterpriseDB): 5.6.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
EnterpriseDBMongoDB Foreign Data Wrapper (mongo_fdw)before 5.6.05.6.0Patch availableCNA
  • MongoDB Foreign Data Wrapper (mongo_fdw) VendorEnterpriseDB Affected before 5.6.0 Fixed in 5.6.0 Patch available CNA

Remediation

Upgrade EnterpriseDB MongoDB Foreign Data Wrapper (mongo_fdw) to version 5.6.0 or later, which accepts only valid 24-character hexadecimal ObjectIds and 12-byte bytea values.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

  • Fix · CNA MongoDB Foreign Data Wrapper (mongo_fdw) (EnterpriseDB) Fixed in 5.6.0

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    EnterpriseDB MongoDB Foreign Data Wrapper (mongo_fdw) 5.6.0

    2 records Highest priority Priority LOW 2 LOW

    Other records, highest priority first

    • TI-2026-98317 Connection URI injection in EnterpriseDB mongo_fdw via unencoded optionsPriority LOW 25

Timeline

  1. 2026-11-25 Threatist record created from CVE-2026-62157
  2. 2026-11-25 CISA SSVC decision points changed
  3. 2026-11-25 Alias added: GHSA-58x3-p638-vfwc

References

  • TI-2023-21738 An issue was discovered in EnterpriseDB Postgres Advanced Server (EPAS) before 11.21.32… CVSS 3.1CRITICAL 9.8
  • TI-2026-95912 Untrusted search path in Postgres Enterprise Manager allows superuser SQL CVSS 4.0CRITICAL 9.4
  • TI-2026-95911 Postgres Enterprise Manager agents can change other agents' jobs CVSS 4.0CRITICAL 9.4
  • TI-2026-95910 PEM agent role grants file read and write on the PEM server host CVSS 4.0CRITICAL 9.4
  • TI-2023-21739 An issue was discovered in EnterpriseDB Postgres Advanced Server (EPAS) before 11.21.32… CVSS 3.1HIGH 8.8
  • TI-2026-37400 When applying replicated changes for a row that is missing one or more columns, pglogical… CVSS 4.0CRITICAL 9.0
See all 41 →

Sources