CVE-2025-40906BSON::XS versions 0.8.4 and earlier for Perl includes a bundled libbson 1.1.7, which has…
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.
What to do
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | libbson-xs-perl | Under investigation | UBUNTU-CVE-2025-40906 | |
| Ubuntu 22.04 | libbson-xs-perl | Under investigation | UBUNTU-CVE-2025-40906 | |
| Ubuntu 20.04 | libbson-xs-perl | Fix pending | UBUNTU-CVE-2025-40906 | |
| Debian 12 | libbson-xs-perl | Will not fix Debian rates this unimportant for its packages (a minor issue, or one that doesn't affect Debian's build), so no security update is planned. | DEBIAN-CVE-2025-40906 |
What the vendor says
As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- MONGODB BSON::XS: affected: up to 0.8.4
Solution: Manually remove the bundled version of libbson, update the "bson" folder with an up-to-date version of libbson's source code and try building against it.
Vendor advisories:
References
- https://lists.debian.org/debian-lts-announce/2025/05/msg00012.html
- https://www.mongodb.com/community/forums/t/mongodb-perl-driver-end-of-life/7890
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.