Skip to main content

CVE-2025-40906: CWE-1395 Dependency on Vulnerable Third-Party Component in MONGODB BSON::XS

Critical
VulnerabilityCVE-2025-40906cvecve-2025-40906cwe-1395cwe-1104
Published: Fri May 16 2025 (05/16/2025, 15:15:49 UTC)
Source: CVE
Vendor/Project: MONGODB
Product: BSON::XS

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.

AI-Powered Analysis

AILast updated: 07/06/2025, 07:40:48 UTC

Technical Analysis

CVE-2025-40906 is a critical vulnerability affecting BSON::XS, the Perl XS implementation of MongoDB's BSON serialization library. BSON::XS versions 0.8.4 and earlier include a bundled version of libbson 1.1.7, which contains multiple known vulnerabilities (CVE-2017-14227, CVE-2018-16790, CVE-2023-0437, CVE-2024-6381, CVE-2024-6383, and CVE-2025-0755). These vulnerabilities collectively impact the confidentiality, integrity, and availability of systems using BSON::XS due to the underlying flaws in libbson. The vulnerabilities stem from CWE-1395 (Dependency on Vulnerable Third-Party Component) and CWE-1104 (Use of Unmaintained Third Party Components), highlighting the risks of relying on outdated and unsupported software components. BSON::XS reached end-of-life on August 13, 2020, meaning no official patches or support are available, leaving users exposed to these critical security issues. The CVSS v3.1 score of 9.8 reflects the severity, with an attack vector of network (AV:N), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and impacts on confidentiality, integrity, and availability (C:H/I:H/A:H). This means an attacker can remotely exploit the vulnerability without authentication or user interaction, potentially leading to full system compromise or data breaches. The lack of available patches further exacerbates the risk, requiring organizations to consider alternative mitigation strategies such as removing or replacing BSON::XS or isolating affected systems. Given the widespread use of MongoDB and its associated libraries in various enterprise applications, this vulnerability presents a significant threat to organizations relying on Perl-based BSON serialization.

Potential Impact

For European organizations, the impact of CVE-2025-40906 can be severe. Organizations using Perl applications that depend on BSON::XS for MongoDB BSON serialization are at risk of remote exploitation leading to unauthorized data access, data corruption, or denial of service. This can result in breaches of sensitive personal data protected under GDPR, leading to regulatory penalties and reputational damage. Critical infrastructure, financial institutions, healthcare providers, and government agencies using MongoDB with Perl bindings may face operational disruptions and data integrity issues. The vulnerability's ability to be exploited remotely without authentication increases the attack surface, potentially allowing attackers to pivot into internal networks or exfiltrate data. Additionally, the end-of-life status of BSON::XS means organizations cannot rely on vendor patches, complicating incident response and remediation efforts. The cumulative effect could be significant financial losses, legal consequences, and erosion of customer trust for affected European entities.

Mitigation Recommendations

Given the absence of official patches due to BSON::XS being end-of-life, European organizations should take the following specific mitigation steps: 1) Audit all Perl applications and dependencies to identify usage of BSON::XS versions 0.8.4 or earlier. 2) Where possible, migrate away from BSON::XS to supported BSON serialization libraries or alternative MongoDB drivers that are actively maintained and patched. 3) If migration is not immediately feasible, isolate systems running vulnerable BSON::XS components within segmented network zones with strict access controls and monitoring to limit exposure. 4) Employ Web Application Firewalls (WAFs) or Intrusion Prevention Systems (IPS) with signatures targeting exploitation attempts against libbson vulnerabilities to detect and block attacks. 5) Implement strict network egress filtering to prevent data exfiltration in case of compromise. 6) Monitor logs and network traffic for anomalous activity indicative of exploitation attempts. 7) Engage in threat intelligence sharing with industry peers and national cybersecurity centers to stay informed about emerging exploit techniques. 8) Develop and test incident response plans specifically addressing exploitation of BSON::XS vulnerabilities. These targeted actions go beyond generic advice by focusing on compensating controls and migration strategies tailored to the unique challenges posed by an unsupported third-party component.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
CPANSec
Date Reserved
2025-04-16T09:05:34.360Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682cd0f91484d88663aeba25

Added to database: 5/20/2025, 6:59:05 PM

Last enriched: 7/6/2025, 7:40:48 AM

Last updated: 8/8/2025, 6:30:33 AM

Views: 24

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats