AI and data stack advisories

Severe, 6 weeks2431Projects328

2431 severe, 6 weeks · 328 projects

MongoDBGHSA-7x6v-xx33-q7wq

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

MongoDB

CVE-2026-106432 · Published Oct 8, 2026

Low2.0
Fix: upgrade to 1.21.11 or later (3 fixed versions below)
GitHub advisory

Impact

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.

Patches

Fixed in 1.21.11, 2.1.11, and 2.5.4.

Workarounds

Avoid runtime configurations that permit multi-gigabyte string values.

References

https://www.cve.org/CVERecord?id=CVE-2026-106432

https://jira.mongodb.org/browse/PHPC-2741

Affected versions

PackageAffectedFixed in
mongodb
Product
>= 1.16.0, < 1.21.111.21.11
>= 2.0.0, < 2.1.112.1.11
>= 2.2.0, < 2.5.42.5.4
mongodb/mongodb-extension
Product
>= 1.16.0, < 1.21.111.21.11
>= 2.0.0, < 2.1.112.1.11
>= 2.2.0, < 2.5.42.5.4
Details and references
CVSS 4.0
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
Severity from
GitHub (reviewed advisory)
Weakness
CWE-681

More MongoDB advisories

All MongoDB