cve.bz

CVE-2026-112368 mongodb inc. php driver: Uncontrolled Recursion

8.2 highEPSS 0.3%

High (8.2) in mongodb inc. php driver. EPSS 0.3% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

8.2 high
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

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
0.3% (unchanged from 0.3% a week ago) estimated probability of exploitation activity in the next 30 days; 18th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2026-10-20. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-674 Uncontrolled Recursion
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-112368 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-112368?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-112368?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-112368 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

  • mongodb inc.:php driver

Versions

From the CNA's record in the CVE List.

ProductAffected
MongoDB Inc. PHP Driverfrom 1.0.0 before 1.21.12
MongoDB Inc. PHP Driverfrom 2.1.0 before 2.1.12
MongoDB Inc. PHP Driverfrom 2.5.0 before 2.5.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12php-mongodbno fix listedDEBIAN-CVE-2026-112368
Debian13php-mongodb2.0.0-1+deb13u2DEBIAN-CVE-2026-112368
Debian14php-mongodb2.5.5-1DEBIAN-CVE-2026-112368
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 4 morephp-mongodbno fix listedUBUNTU-CVE-2026-112368

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Red Hat has rated this vulnerability as Important because an unauthenticated attacker capable of providing arbitrary BSON data can induce native stack exhaustion and crash PHP worker processes remotely without requiring elevated privileges. The failure occurs within the underlying driver C extension, bypassing user-space exception handling and causing immediate process termination. While serious for services parsing untrusted input, the MongoDB PHP extension is not shipped in core Red Hat Enterprise Linux repositories and is only available through Extra Packages for Enterprise Linux (EPEL).

Red Hat's mitigation

--- CME Mitigation Guidance (2026-10-20) ---

Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.

The highest-value action is to enforce recursion depth boundaries or restrict the intake of untrusted binary BSON payloads processed by the MongoDB PHP driver decoder: upgrade to php-pecl-mongodb 1.21.12, 2.1.12, 2.5.5 (or the fixed Php Pecl Mongodb builds), which enforces recursion depth bounds in phongo_bson_visit_document and visit_array during BSON decoding to prevent stack exhaustion crashes, closing all 2 injection vectors (deeply nested BSON documents, deeply nested BSON arrays). Until patched, this is a concern on PHP applications decoding untrusted binary BSON documents via the MongoDB PHP driver across any platform, so Restrict unauthenticated network access to endpoints handling binary BSON decoding and validate incoming document structure before invoking parser routines. As a compensating measure, Configure systemd WatchdogSec and Restart directives to automatically restart PHP processes upon abrupt termination from stack exhaustion and Implement rate limiting and connection throttling to restrict request frequency from unauthenticated callers and prevent sustained service disruption. These controls limit blast radius and contain exploitation, but they do not fix the underlying uncontrolled recursion defect — apply the upstream patch to fully remediate.

Highest-impact CME: CME-1204 Service Watchdog and Automatic Restart (systemd WatchdogSec/Restart) (medium)

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-112368.

Attack patterns (CAPEC)

  • CAPEC-230 Serialized Data with Nested Payloads Likelihood: Medium · Severity: High
  • CAPEC-231 Oversized Serialized Data Payloads Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON