KEVWire

Security intelligence, with context.

Response snapshot Oct 27, 2026, 16:31 UTC

Back to the wire
Permalink
VulnerabilityCVE-2026-106435

MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element

MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element

At a glance

Exploited
Not known
Severity
8.2 High (CVSS 4.0)
Chance of exploitation
Not estimated
Sources
1 source

What to do

GitHub lists first patched versions: pymongo: 4.18.3. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-98qm-wvgf-w4cf (opens a new tab)

What happened

### Impact The 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.

### Patches Fixed in PyMongo 4.18.3. Malformed Regex elements now raise InvalidBSON on every accepted buffer type; valid documents decode unchanged.

### Workarounds Decode untrusted BSON only from NUL-terminated buffers — bytes or bytearray — and copy mmap input first, e.g. bytes(mm[:size]).

Continue reading

Affected package ranges reported by GitHub: pymongo: >= 3.9.0, <= 4.18.2

Scores and how they were measured

CVSS base severity

8.2

Version 4.0As of

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

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

Not available

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-98qm-wvgf-w4cf (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-98qm-wvgf-w4cf, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 27). MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element (CVE-2026-106435). https://kevwire.com/record/CVE-2026-106435

MLA

"MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element (CVE-2026-106435)." KEVWire, 27 Oct. 2026, kevwire.com/record/CVE-2026-106435.

Chicago

KEVWire. "MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element (CVE-2026-106435)." Last modified October 27, 2026. https://kevwire.com/record/CVE-2026-106435.

Evidence summary (plain text)

MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element (Oct 27, 2026).
MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element
CVSS 8.2 (version 4.0; evidence as of Oct 27, 2026; https://github.com/advisories/GHSA-98qm-wvgf-w4cf).
Sources:
GitHub-reviewed advisory GHSA-98qm-wvgf-w4cf: https://github.com/advisories/GHSA-98qm-wvgf-w4cf
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
Record ID: CVE-2026-106435.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 27, 2026, 16:25 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are not available yet. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail