MongoDBGHSA-6x9j-rv94-gxc8
Application denial of service and data truncation via unchecked BSON append failures in MongoDB PHP Driver
Fix: upgrade to 1.21.11 or later (3 fixed versions below)
Impact
The BSON encoder in the MongoDB PHP Driver does not check some return values after a document exceeds libbson's size limit. This can leave the encoder in an invalid state. An unauthenticated actor who can cause an affected application to encode an unusually large data structure can terminate the PHP worker or cause the resulting document to omit fields. No MongoDB server connection or database authentication is required.
Patches
Fixed in 1.21.11, 2.1.11, and 2.5.4.
Workarounds
Validate the size of data structures prior to encoding.
References
https://www.cve.org/CVERecord?id=CVE-2026-106436
https://jira.mongodb.org/browse/PHPC-2739
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| mongodb Product | >= 1.3.0, < 1.21.11 | 1.21.11 |
| >= 2.0.0, < 2.1.11 | 2.1.11 | |
| >= 2.2.0, < 2.5.4 | 2.5.4 | |
| mongodb/mongodb-extension Product | >= 1.3.0, < 1.21.11 | 1.21.11 |
| >= 2.0.0, < 2.1.11 | 2.1.11 | |
| >= 2.2.0, < 2.5.4 | 2.5.4 |
Details and references
- CVSS 4.0
- CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-252