---
id: "CVE-2026-112368"
kind: "vulnerability"
aliases: ["CVE-2026-112368"]
title: "MongoDB PHP driver: crafted BSON input crashes PHP process via stack exhaustion"
severity: "high"
cvss: 8.2
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["mongodb", "package", "php", "self-hosted"]
not_affected_if: ["no-untrusted-bson-input"]
published_at: "2026-10-19T16:17:07+00:00"
first_seen_at: "2026-10-23T21:57:18+00:00"
updated_at: "2026-10-25T03:04:18+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112368", "first_seen_at": "2026-10-23T21:57:18+00:00"}]
---

# MongoDB PHP driver: crafted BSON input crashes PHP process via stack exhaustion

The MongoDB PHP driver's BSON decoder recurses without limit, so a crafted binary document can exhaust the process stack. The PHP process using the driver then terminates, causing a denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed driver version with `php -i | grep -i mongodb` or `php --ri mongodb`
- Check `composer.lock` for `mongodb/mongodb` and the `ext-mongodb` version the project pins
- unknown for whether the sources list affected version ranges

## Fix

- Upgrade the MongoDB PHP extension (`ext-mongodb`) to the patched release named in the MongoDB advisory; unknown for the exact version in the sources
- Upgrade the `mongodb/mongodb` library if it is in use; unknown for the exact version

## Timeline

- 2026-10-23T21:57:18+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-112368

## From the sources

An uncontrolled recursion weakness in the BSON decoding logic of the MongoDB PHP driver may allow an unauthenticated party who can supply crafted binary document data to the decoder to exhaust the process stack. This may cause the PHP process using the driver to terminate unexpectedly, resulting in a loss of availability for that process. The condition occurs below the PHP layer and cannot be intercepted by application-level error handling.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
