{"id":"CVE-2026-62157","aliases":["CVE-2026-62157"],"related":[],"kind":"vulnerability","state":"published","title":"mongo_fdw out-of-bounds read when building an ObjectId from short _id values","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-25T16:36:24.037Z","modified":"2026-11-25T20:16:05.627Z","severity":{"scorer":"EDB","scheme":"CVSS:4.0","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","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"EDB","scheme":"CVSS:4.0","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","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"type":"custom","introduced":"0","fixed":"5.6.0","status":"affected"}],"vendor":"EnterpriseDB","product":"MongoDB Foreign Data Wrapper (mongo_fdw)","repo":"https://github.com/EnterpriseDB/mongo_fdw","source":"cvelist"}],"references":[{"url":"https://www.enterprisedb.com/docs/security/advisories/cve202662157/","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/EnterpriseDB/mongo_fdw/releases/tag/REL-5_6_0","tags":["patch","release-notes"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"EDB","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-25T17:07:00.803Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-62157","url":"https://www.cve.org/CVERecord?id=CVE-2026-62157","licence":"CVE Terms of Use","modified":"2026-11-25T17:07:21.664Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-62157","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62157","licence":"Public domain","modified":"2026-11-25T20:16:05.627Z"}],"updatedAt":"2026-11-25T23:18:16.790Z","epss":{"score":0.00621,"percentile":0.51124,"date":"2026-12-01T12:00:22.000Z"}}