# CVE-2026-112368: MongoDB PHP driver uncontrolled recursion in BSON decoding

Source: https://junglewise.ai/threats/cve-2026-112368-an-uncontrolled-recursion-weakness-in-the-bson-decoding-logic-of  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-19. Updated: 2026-10-19  
License: CC BY 4.0 with a link back

CVE-2026-112368 · Severity: high · CVSS 7.5 · Published 2026-10-19

The MongoDB PHP driver contains a flaw in its BSON binary format decoder that can be triggered by supplying specially crafted data. An attacker who can send malicious BSON documents to an application using this driver can cause the PHP process to crash, disrupting service availability. The vulnerability cannot be caught by application error handling since it occurs in the underlying driver code.

Technologies: [MongoDB PHP Driver](https://junglewise.ai/threats/technologies/php-driver). Vendors: [MongoDB](https://junglewise.ai/threats/vendors/mongodb).

## Quick answers

**Is CVE-2026-112368 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-112368 being exploited in the wild.

**How severe is CVE-2026-112368?** High severity, with a CVSS score of 7.5, published 19 October 2026.

**Which products and versions are affected?** MongoDB PHP Driver before 1.21.12, 2.0.x before 2.1.12, 2.2.x before 2.5.5.

**Is there a fix for CVE-2026-112368?** Yes: fixed in 1.21.12, 2.1.12, 2.5.5. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-112368 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-112368?** 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.12, 2.1.12, 2.5.5

## Technical details

An uncontrolled recursion weakness in the BSON decoding logic allows an unauthenticated attacker to supply crafted binary BSON data that exhausts the process stack, leading to segmentation faults and PHP process termination. The attack requires network access to send BSON documents to an application using the driver but no authentication. The condition occurs below the PHP layer and cannot be intercepted by application-level error handling.

## Affected products

- MongoDB PHP driver before 1.21.12, 2.0.x before 2.1.12, 2.2.x before 2.5.5

## Timeline

- 2026-10-19: disclosed
- 2026-10-14: patched

## References

- [https://jira.mongodb.org/browse/PHPC-276](https://jira.mongodb.org/browse/PHPC-276)

## Related threats

- [MongoDB PHP Driver BSON encoder unchecked return values](https://junglewise.ai/threats/cve-2026-106436-the-bson-encoder-in-the-mongodb-php-driver-does-not-check-some)
- [The BSON encoder in the MongoDB PHP Driver converts a string length to a 32-bit value without validation. When an…](https://junglewise.ai/threats/cve-2026-106432-the-bson-encoder-in-the-mongodb-php-driver-converts-a-string)
- [MongoDB PHP Driver deserialization of untrusted data in command monitoring](https://junglewise.ai/threats/cve-2026-96745-deserialization-of-untrusted-data-in-the-command-monitoring)
- [MongoDB PHP Driver out-of-bounds read in BSON decoding](https://junglewise.ai/threats/cve-2026-84968-mongodb-php-driver-out-of-bounds-read-in-bson-decoding)
- [Stack exhaustion vulnerability in the MongoDB PHP driver can cause application crashes when processing deeply nested…](https://junglewise.ai/threats/cve-2026-6811-mongodb-php-driver-stack-exhaustion-in-bson-processing)
