BSON Serialization Vulnerabilities in Perl's BSON::XS Library

Patch this weekFull system takeover over the network, no login needed.
9.8CRITICAL

CVE-2025-40906

Key Information:

Vendor

Mongodb

Status
CVE ID
CVE ID:
CVE-2025-40906
Vendor
CVE Published:
16 May 2025

Timeline

  • Vulnerability published

  • Vulnerability Reserved

How risky is it?

  • Yes: Works over the network, no login needed
  • No: No public exploit yet
  • No: Not on CISA's exploited list
  • No: No ransomware use seen

Our verdict

Patch this week

Exploitation is likely. Prioritise the fix.

What to do

1Check the vendor's fix

No fixed version is recorded yet. The vendor advisory is the authoritative source for patches.

Read the vendor advisory β†—
2Can't patch yet? Reduce exposure

It can be reached over the network, so limit who can reach Bson::xs. Block it from the internet, allow only trusted hosts or a VPN, and turn off the affected feature if you don't use it, until you can update.

3Why it's rated "Patch this week"
  • It can be exploited remotely without credentials.
  • Its CVSS severity is critical (9.8).

What is CVE-2025-40906?

BSON::XS for Perl, specifically versions up to 0.8.4, include a bundled version of libbson (1.1.7) that harbors multiple vulnerabilities. These include numerous issues discovered over the years, leading to significant security risks. As this library has reached its end-of-life as of August 13, 2020, it is no longer supported, emphasizing the necessity for users to migrate to alternatives or secure configurations to maintain system integrity.

Affected Version(s)

BSON::XS 0 <= 0.8.4

References

Use-After-Free Vulnerability in MongoDB Server's Replication Component

CVE-2026-118383
MongodbMongodb ServerπŸ˜„πŸ‘Ύ9.5CRITICAL

TLS Implementation Flaw in MongoDB on macOS for IPv6 Connections

CVE-2026-120808
MongodbMongodb Server9.1CRITICAL

Memory Exhaustion Vulnerability in MongoDB

CVE-2026-25611
MongoDBMongodb Server8.7HIGH
View more Mongodb vulnerabilities...

Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities Β· Report a correction

CVSS V3.1

Score:
9.8
Severity:
CRITICAL
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged
.