3.6Low

CVE-2026-106432Heap buffer overflow via 32-bit string-length truncation in MongoDB PHP Driver

MongoDB PHP Driver Published: (1 month ago)

Description

The BSON encoder in the MongoDB PHP Driver converts a string length to a 32-bit value without validation. When an affected application encodes a string near 4 GiB, the allocation size can wrap while the copy operation uses the original length. The resulting heap buffer overflow can corrupt process memory or terminate the PHP process. Reaching this issue requires a non-default runtime configuration that permits multi-gigabyte values. No MongoDB server interaction is required.

Weakness (CWE): CWE-681

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
MongoDB PHP Driver 1.16.0 – < 1.21.11, 2.0.0 – < 2.1.11, 2.2.0 – < 2.5.4

References and patches

CPE matches (NVD) (3)

  • cpe:2.3:a:mongodb:php_driver:*:*:*:*:*:mongodb:*:* ≥ 1.3.0 < 1.21.1
  • cpe:2.3:a:mongodb:php_driver:*:*:*:*:*:mongodb:*:* ≥ 2.0.0 < 2.1.11
  • cpe:2.3:a:mongodb:php_driver:*:*:*:*:*:mongodb:*:* ≥ 2.2.0 < 2.5.4