CVE-2026-106432Heap buffer overflow via 32-bit string-length truncation in MongoDB PHP Driver
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.
Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.
Affected products and versions
| Vendor | Product | Versions | |
|---|---|---|---|
| MongoDB | PHP Driver | 1.16.0 – < 1.21.11, 2.0.0 – < 2.1.11, 2.2.0 – < 2.5.4 |
References and patches
- https://jira.mongodb.org/browse/PHPC-2741 Vendor Advisory
CPE matches (NVD) (3)
cpe:2.3:a:mongodb:php_driver:*:*:*:*:*:mongodb:*:*≥ 1.3.0 < 1.21.1cpe:2.3:a:mongodb:php_driver:*:*:*:*:*:mongodb:*:*≥ 2.0.0 < 2.1.11cpe:2.3:a:mongodb:php_driver:*:*:*:*:*:mongodb:*:*≥ 2.2.0 < 2.5.4