Vulnerability · Published Mar 18, 2025 · Assigned by mongodb
CVE-2025-0755MongoDB C Driver bson library may be susceptible to buffer overflow
High 8.4
In plain English
A high-severity heap buffer overflow in libbson from MongoDB Inc. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 56% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
The various bson_append functions in the MongoDB C driver library may be susceptible to buffer overflow when performing operations that could result in a final BSON document which exceeds the maximum allowable size (INT32_MAX), resulting in a segmentation fault and possible application crash. This issue affected libbson versions prior to 1.27.5, MongoDB Server v8.0 versions prior to 8.0.1 and MongoDB Server v7.0 versions prior to 7.0.16
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | libbson-xs-perl | 0.8.4-2+deb12u1 | DEBIAN-CVE-2025-0755 |
| Debian:12 | mongo-c-driver | 1.23.1-1+deb12u1 | DEBIAN-CVE-2025-0755 |
| Debian:13 | mongo-c-driver | 1.27.5-1 | DEBIAN-CVE-2025-0755 |
| Debian:14 | mongo-c-driver | 1.27.5-1 | DEBIAN-CVE-2025-0755 |
| Ubuntu:22.04:LTS | mongo-c-driver | no fix listed | UBUNTU-CVE-2025-0755 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| MongoDB Inc | libbson | 0 – before 1.27.5 |
| MongoDB Inc | MongoDB Server | 8.0 – before 8.0.17.0 – before 7.0.16 |
Weakness: CWE-122 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H