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

Published Oct 8, 2026
·
Updated

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.

Affected Software

1 affected component
MongoDB MongoDB PHP driver

Event History

Oct 8, 2026
CVE Published
via MITRE·07:02 PM
Data Sourced
via MITRE·07:02 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness
Oct 9, 2026
Event
via NVD·11:03 AM

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Only applications using the affected MongoDB PHP Driver BSON encoder are exposed, and reaching the flaw requires a non-default PHP runtime configuration that permits multi-gigabyte values. MongoDB server interaction is not required.

2

What is required to trigger the overflow?

The application must encode a string close to 4 GiB. Its length is converted to a 32-bit value without validation, allowing the allocation size to wrap while copying still uses the original length.

3

What can happen if the issue is triggered?

The heap buffer overflow can corrupt memory in the PHP process or cause that process to terminate. The stated impact is limited to integrity and availability.

4

How can teams assess whether they are at risk?

Review whether the application uses the MongoDB PHP Driver to BSON-encode strings and whether its PHP runtime has been configured to allow multi-gigabyte values. Default runtime configurations do not meet the stated prerequisite.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203