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

8 affected componentsFixes available
MongoDB MongoDB PHP driver
MongoDB Php Driver Mongodb>=1.3.0<1.21.1
MongoDB Php Driver Mongodb>=2.0.0<2.1.11
MongoDB Php Driver Mongodb>=2.2.0<2.5.4
debian/php-mongodb<=1.15.0+1.11.1+1.9.2+1.7.5-1, <=2.0.0-1, <=2.5.3-1
2.0.0-1+deb13u22.5.5-1
debian/php-mongodb*
debian/php-mongodb<2.0.0-1+deb13u2
2.0.0-1+deb13u2
debian/php-mongodb<2.5.5-1
2.5.5-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/php-mongodb to a version that resolves this vulnerability.

    Fixed in 2.0.0-1+deb13u2Fixed in 2.5.5-1
  2. Upgrade

    Upgrade debian/php-mongodb to a version that resolves this vulnerability.

    Fixed in 2.0.0-1+deb13u2
  3. Upgrade

    Upgrade debian/php-mongodb to a version that resolves this vulnerability.

    Fixed in 2.5.5-1

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
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·08:17 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

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