CVE-2026-106436: MongoDB PHP Driver BSON encoder unchecked return values

CVE-2026-106436 · Severity: medium · CVSS 4.8 · Published 2026-10-08

The MongoDB PHP Driver's BSON encoder fails to validate return values when encoding large data structures, potentially crashing the PHP worker process or silently omitting critical fields from encoded documents. An attacker who can control application input can trigger this flaw without needing database credentials, leading to denial of service or data corruption.

Technologies: MongoDB PHP Driver. Vendors: MongoDB.

Quick answers

Is CVE-2026-106436 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-106436 being exploited in the wild.
How severe is CVE-2026-106436?
Medium severity, with a CVSS score of 4.8, published 8 October 2026.
Which products and versions are affected?
MongoDB PHP Driver prior to 1.21.11, 2.1.11, 2.5.4.
Is there a fix for CVE-2026-106436?
Yes: fixed in 1.21.11, 2.1.11, 2.5.4. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-106436 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-106436?
Check whether you run MongoDB PHP Driver at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 1.21.11, 2.1.11, 2.5.4

Technical details

The vulnerability exists in src/phongo_bson_encode.c where multiple libbson append function calls ignore boolean return values, violating libbson's contract that false indicates an invalid child object. When documents exceed 2 GiB or allocation fails, the encoder recurses into uninitialized memory and calls bson_append_document_end, triggering an abort. Separately, scalar append failures silently truncate documents without signaling the application, potentially dropping critical fields like _id or __pclass metadata.

Affected products

  • MongoDB PHP Driver prior to 1.21.11, 2.1.11, 2.5.4

Timeline

  • 2026-10-08: disclosed
  • 2026-10-08: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.