Heap buffer overflow via 32-bit string-length truncation in MongoDB PHP Driver
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in PHP Driver 1.21.11, PHP Driver 2.1.11 and PHP Driver 2.5.4.
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
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| MongoDB | PHP Driver | >=1.16.0 <1.21.11, >=2.0.0 <2.1.11, >=2.2.0 <2.5.4 | 1.21.11, 2.1.11, 2.5.4 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in MongoDB, strongest first
Embed
A live severity badge for an advisory, README or ticket