CVEfocus › CVE database › CVE-2025-40906

CVE-2025-40906BSON::XS versions 0.8.4 and earlier for Perl includes a bundled libbson 1.1.7, which has…

CVSS 9.8 CriticalEPSS 0.6% (higher than 52% of CVEs)Published 2025-05-16Updated 2025-09-09Assigner: CPANSec

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.

CWE-1104CWE-122CWE-1395CWE-190

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

1Fix pending
2Under investigation
1Will not fix

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04libbson-xs-perlUnder investigationUBUNTU-CVE-2025-40906
Ubuntu 22.04libbson-xs-perlUnder investigationUBUNTU-CVE-2025-40906
Ubuntu 20.04libbson-xs-perlFix pendingUBUNTU-CVE-2025-40906
Debian 12libbson-xs-perlWill 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.

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

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.