CVE-2025-40906: mongodb bson::xs
Vulnerability summary
CVE-2025-40906 is a critical (CVSS 9.8) vulnerability in mongodb bson::xs. EPSS estimates a 0.64% chance of exploitation in the next 30 days, higher than 49.4% of scored vulnerabilities.
Timeline
- 16-05-2025PublishedVulnerability first disclosed.
- 09-09-2025Last modifiedVulnerability information updated.
Description
BSON::XS versions 0.8.4 and earlier for Perl includes a bundled libbson 1.1.7, which has several vulnerabilities. Those include CVE-2017-14227, CVE-2018-16790, CVE-2023-0437, CVE-2024-6381, CVE-2024-6383, and CVE-2025-0755. BSON-XS was the official Perl XS implementation of MongoDB's BSON serialization, but this distribution has reached its end of life as of August 13, 2020 and is no longer supported.
CVSS metrics
4 scores · 4 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVDNIST9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.64%
Chance of exploitation in the next 30 days
Percentile
49%
Versus all other CVEs
30-day change
+0.03 pp
From 0.61% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-1395Dependency on Vulnerable Third-Party ComponentThe product has a dependency on a third-party component that contains one or more known vulnerabilities.
- CWE-122Heap-based Buffer OverflowA heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
- CWE-190Integer Overflow or WraparoundThe product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
- CWE-1104Use of Unmaintained Third Party ComponentsThe product relies on third-party components that are not actively supported or maintained by the original developer or a trusted proxy for the original developer.
Affected systems
Debian1 product
- libbson-xs-perlAll versions (No fix recorded)
Mongodb1 product
- bson::xs≤ 0.8.4
Ubuntu1 product
- libbson-xs-perlAll versions (No fix recorded)
3 vendors · 3 products