{"id":"CVE-2026-62157","aliases":[],"title":"mongo_fdw out-of-bounds read when building an ObjectId from short _id values","originalDescription":"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":{"cvss":5.3,"vector":"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","label":"medium"},"exploitation":{"kev":null,"epss":{"score":0.00621,"percentile":0.44154},"exploitDb":null},"affected":[{"ecosystem":"vendor","name":"MongoDB Foreign Data Wrapper (mongo_fdw)","range":">=0, <5.6.0","fixed":"5.6.0"}],"references":[{"url":"https://www.enterprisedb.com/docs/security/advisories/cve202662157/","type":"vendor-advisory"},{"url":"https://github.com/EnterpriseDB/mongo_fdw/releases/tag/REL-5_6_0","type":"release-notes"}],"sources":[{"name":"nvd","at":"2026-11-25T20:25:28.773Z","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62157","license":"NVD terms of use","firstSeenAt":"2026-11-25T17:40:40.494Z"},{"name":"osv","at":"2026-11-26T21:45:20.837Z","url":"https://osv.dev/vulnerability/CVE-2026-62157","license":"CC-BY 4.0","firstSeenAt":"2026-11-26T21:12:09.322Z"},{"name":"cvelistV5","at":"2026-11-28T22:41:00.179Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-62157","license":"CVE Terms of Use","firstSeenAt":"2026-11-25T17:04:55.568Z"}],"firstSeenAt":"2026-11-25T17:04:55.568Z","publishedAt":"2026-11-25T16:36:24.037Z","modifiedAt":"2026-11-26T21:02:20.419Z"}