{"id":"CVE-2026-106435","aliases":["AZL-107129","DEBIAN-CVE-2026-106435","EUVD-2026-95254","GHSA-86gh-39m5-hhg6","GHSA-98qm-wvgf-w4cf","UBUNTU-CVE-2026-106435"],"status":"published","title":"Application denial of service via out-of-bounds read in BSON Regex decoding in MongoDB Python Driver","description":"The MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","severity":{"version":"4.0","score":5.9,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00094,"percentile":0.00563,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-125"],"published":"2026-10-08T20:12:15Z","modified":"2026-11-05T05:36:30Z","fixes":[{"ecosystem":"PyPI","package":"pymongo","fixed_in":["4.18.3"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:14","package":"pymongo","fixed_in":["4.19.0-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.9.0"},{"last_affected":"4.18.2"},{"fixed":"4.18.3"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"python-pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"4.2.0-9"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.11.0-1","3.11.0-1+deb12u1","4.10.1-1","4.10.1-2","4.10.1-3","4.10.1-4","4.10.1-5","4.10.1-6","4.15.3-1","4.15.3-2","4.15.4-1","4.15.4-2","4.15.5-1","4.16.0-1","4.17.0-1","4.18.1-1","4.18.2-1","4.19.0-1","4.7.3-1","4.7.3-2"]},{"source":"osv","ecosystem":"Debian:13","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.10.1-6","4.15.3-1","4.15.3-2","4.15.4-1","4.15.4-2","4.15.5-1","4.16.0-1","4.17.0-1","4.18.1-1","4.18.2-1","4.19.0-1"]},{"source":"osv","ecosystem":"Debian:14","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.19.0-1"}]}],"versions":["4.10.1-6","4.15.3-1","4.15.3-2","4.15.4-1","4.15.4-2","4.15.5-1","4.16.0-1","4.17.0-1","4.18.1-1","4.18.2-1"]},{"source":"osv","ecosystem":"PyPI","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.9.0"},{"fixed":"4.18.3"}]}],"versions":["3.10.0","3.10.1","3.11.0","3.11.1","3.11.2","3.11.3","3.11.4","3.12.0","3.12.1","3.12.2","3.12.3","3.13.0","3.9.0","4.0","4.0.1","4.0.2","4.1.0","4.1.1","4.10.0","4.10.1","4.11","4.11.1","4.11.2","4.11.3","4.12.0","4.12.1","4.13.0","4.13.0.dev0","4.13.1","4.13.2","4.14.0","4.14.1","4.15.0","4.15.1","4.15.2","4.15.3","4.15.4","4.15.5","4.16.0","4.16.0.dev0","4.17.0","4.18.0","4.18.1","4.18.2","4.2.0","4.3.2","4.3.3","4.4.0","4.4.0b0","4.4.1","4.5.0","4.6.0","4.6.1","4.6.2","4.6.3","4.7.0","4.7.1","4.7.2","4.7.3","4.8.0","4.8.0b0","4.9","4.9.1","4.9.2"]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.6-1","2.6.2-1","2.6.3-1","2.6.3-1build1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.3-1","3.2-1","3.2-1build1","3.2-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.4.0-1build2","3.6.1+dfsg1-1","3.6.1+dfsg1-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.7.1-1.1","3.7.1-1.1build1","3.10.1-0ubuntu2","3.10.1-0ubuntu2.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.11.0-1build2","3.11.0-1build3","3.11.0-1build4","3.11.0-1ubuntu0.22.04.1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.11.0-1build6","3.11.0-1build7","3.11.0-1build8","3.11.0-1ubuntu0.24.04.1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.16.0-1build1","4.17.0-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"pymongo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.10.1-6","4.15.3-1","4.15.3-2","4.15.5-1","4.16.0-1","4.16.0-1build1"]}],"products":[{"vendor":"mongodb","product":"python driver"},{"vendor":"mongodb","product":"python_driver"}],"references":[{"url":"https://jira.mongodb.org/browse/PYTHON-6110","tags":["Vendor Advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-106435","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-86gh-39m5-hhg6"},{"url":"https://github.com/mongodb/mongo-python-driver/security/advisories/GHSA-98qm-wvgf-w4cf","tags":["web"]},{"url":"https://github.com/mongodb/mongo-python-driver/pull/3109","tags":["web"]},{"url":"https://github.com/mongodb/mongo-python-driver/commit/bb8d4e195275e75bd94ebeffb53cc747d357fcf4","tags":["web"]},{"url":"https://github.com/mongodb/mongo-python-driver/releases/tag/4.18.3","tags":["web"]},{"url":"https://github.com/advisories/GHSA-98qm-wvgf-w4cf"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/106xxx/CVE-2026-106435.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-106435","tags":["advisory"]},{"url":"https://github.com/mongodb/mongo-python-driver","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2026-106435","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-106435","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-106435","title":"Application denial of service via out-of-bounds read in BSON Regex decoding in MongoDB Python Driver","description":"The MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","status":"published","published":"2026-10-08T20:12:15.074Z","modified":"2026-10-09T11:49:28.787Z","cvss":[{"version":"4.0","score":5.9,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"medium","assessor":"cna"},{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T14:20:04.463704Z"}],"euvd":[{"id":"EUVD-2026-95254","description":"The MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","status":"published","published":"2026-10-08T20:12:15Z","modified":"2026-10-09T11:49:28Z","cvss":[{"version":"4.0","score":5.9,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"medium"}],"updated_at":"2026-11-02T17:27:25.459601Z"}],"ghsa":[{"id":"GHSA-86gh-39m5-hhg6","title":"Duplicate Advisory: PYTHON-6110 Out-of-bounds read in BSON decoding via a malformed Regex element","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-98qm-wvgf-w4cf. This link is maintained to preserve external references.\n\n## Original Description\nThe MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","status":"withdrawn","published":"2026-10-08T21:33:28Z","modified":"2026-10-27T15:36:26Z","cvss":[{"version":"4.0","score":5.9,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium"},{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T14:41:37.912288Z"},{"id":"GHSA-98qm-wvgf-w4cf","title":"MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element","description":"### Impact\nThe C extension's BSON decoder scans a Regex element's pattern and flags strings with strlen before checking the document's remaining length, so a crafted truncated Regex element can read past the end of the caller's buffer. bson.decode and bson.decode_all accept mmap and array buffers, which carry no NUL sentinel; the read can cross into unmapped memory and kill the process with an uncatchable SIGSEGV. Any application decoding untrusted BSON from such buffers is affected — impact is availability only, since the out-of-bounds bytes are never returned as content. NUL-terminated buffers (bytes, bytearray) raise `InvalidBSON` at worst; the driver's own transport and pure-Python installs are not affected. All releases through 4.18.2 are affected when the C extension is loaded.\n\n### Patches\nFixed in PyMongo 4.18.3. Malformed Regex elements now raise InvalidBSON on every accepted buffer type; valid documents decode unchanged.\n\n###  Workarounds\nDecode untrusted BSON only from NUL-terminated buffers — bytes or bytearray — and copy mmap input first, e.g. bytes(mm[:size]).","status":"published","published":"2026-10-27T15:36:35Z","modified":"2026-10-27T15:36:37Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T14:41:37.912288Z"}],"nvd":[{"id":"CVE-2026-106435","description":"The MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","status":"published","published":"2026-10-08T21:17:51.667Z","modified":"2026-10-15T17:00:36.98Z","cvss":[{"version":"4.0","score":5.9,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"secondary"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T14:12:55.142936Z"}],"osv":[{"id":"CVE-2026-106435","title":"Application denial of service via out-of-bounds read in BSON Regex decoding in MongoDB Python Driver","description":"The MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","status":"published","published":"2026-10-08T20:12:15.074Z","modified":"2026-10-28T02:30:38.734544464Z","cvss":[{"version":"4.0","score":5.9,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T15:44:54.583213Z"},{"id":"DEBIAN-CVE-2026-106435","description":"The MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","status":"published","published":"2026-10-08T21:17:51.667Z","modified":"2026-10-24T05:00:38.378851377Z","cvss":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:45:49.381767Z"},{"id":"GHSA-86gh-39m5-hhg6","title":"Duplicate Advisory: PYTHON-6110 Out-of-bounds read in BSON decoding via a malformed Regex element","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-98qm-wvgf-w4cf. This link is maintained to preserve external references.\n\n## Original Description\nThe MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","status":"withdrawn","published":"2026-10-08T21:33:28Z","modified":"2026-10-27T15:47:24.2767259Z","cvss":[{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"},{"version":"4.0","score":5.9,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T15:46:42.077781Z"},{"id":"GHSA-98qm-wvgf-w4cf","title":"MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element","description":"### Impact\nThe C extension's BSON decoder scans a Regex element's pattern and flags strings with strlen before checking the document's remaining length, so a crafted truncated Regex element can read past the end of the caller's buffer. bson.decode and bson.decode_all accept mmap and array buffers, which carry no NUL sentinel; the read can cross into unmapped memory and kill the process with an uncatchable SIGSEGV. Any application decoding untrusted BSON from such buffers is affected — impact is availability only, since the out-of-bounds bytes are never returned as content. NUL-terminated buffers (bytes, bytearray) raise `InvalidBSON` at worst; the driver's own transport and pure-Python installs are not affected. All releases through 4.18.2 are affected when the C extension is loaded.\n\n### Patches\nFixed in PyMongo 4.18.3. Malformed Regex elements now raise InvalidBSON on every accepted buffer type; valid documents decode unchanged.\n\n###  Workarounds\nDecode untrusted BSON only from NUL-terminated buffers — bytes or bytearray — and copy mmap input first, e.g. bytes(mm[:size]).","status":"published","published":"2026-10-27T15:36:35Z","modified":"2026-10-27T15:47:24.276730806Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T15:46:43.524801Z"},{"id":"UBUNTU-CVE-2026-106435","description":"The MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","status":"published","published":"2026-10-08T21:17:00Z","modified":"2026-10-17T12:58:00.258648184Z","cvss":[{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"},{"version":"4.0","score":5.9,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"medium"}],"updated_at":"2026-11-02T16:55:59.130573Z"},{"id":"AZL-107129","title":"CVE-2026-106435 affecting package python-pymongo 4.2.0-9","description":"The MongoDB Python Driver's binary accelerator can read outside a buffer when an application decodes malformed BSON containing a truncated regular-expression element without a trailing NUL byte. An actor who can supply BSON to the documented decode or decode_all API can cause the application process to terminate when the C extension is loaded. The driver's normal database wire-protocol path does not reach this code.","status":"published","published":"2026-10-08T21:17:51Z","modified":"2026-11-05T05:36:30Z","updated_at":"2026-11-05T16:41:17.969374Z"}]}}
