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

Critical 9.8 Published Updated

BSON::XS bundles vulnerable libbson versions, exposing users to multiple security flaws in an unsupported library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-40906?

CVE-2025-40906 is a critical vulnerability in MONGODB BSON::XS, published on 16 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-190, CWE-1395, CWE-122, CWE-1104

Which versions are affected by CVE-2025-40906?

How do I fix CVE-2025-40906?

No fix has been published for CVE-2025-40906 yet. Limit exposure of the affected software until one is available.

Is CVE-2025-40906 being exploited?

There is no known exploitation of CVE-2025-40906 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2025-40906, GHSA-5pww-x83q-7gjh, UBUNTU-CVE-2025-40906.

Is CVE-2025-40906 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free