CVE-2025-40906: CWE-1395 Dependency on Vulnerable Third-Party Component in MONGODB BSON::XS
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 Analysis
Technical Summary
CVE-2025-40906 is a critical vulnerability affecting BSON::XS, the Perl XS implementation of MongoDB's BSON serialization library. Specifically, 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 expose the library to severe security risks including buffer overflows (CWE-122), integer overflows (CWE-190), use of vulnerable third-party components (CWE-1395), and improper control of code generation (CWE-1104). The bundled libbson 1.1.7 is outdated and no longer maintained, and BSON::XS itself reached end-of-life status as of August 13, 2020, meaning no official patches or support are available. The CVSS 3.1 base score of 9.8 reflects the critical nature of this vulnerability, with an attack vector that is network accessible, no privileges or user interaction required, and impacts confidentiality, integrity, and availability. Exploitation could allow remote attackers to execute arbitrary code, cause denial of service, or compromise sensitive data by exploiting memory corruption and logic errors in BSON processing. Although no known exploits are currently reported in the wild, the presence of multiple severe underlying vulnerabilities in a widely used serialization library for MongoDB data formats makes this a significant threat, especially for legacy Perl applications still relying on BSON::XS. Organizations using BSON::XS should consider the risk of continued use of this deprecated library and the bundled vulnerable libbson component.
Potential Impact
For European organizations, the impact of this vulnerability can be substantial, particularly for those relying on Perl applications that utilize BSON::XS for MongoDB data serialization. Exploitation could lead to remote code execution, data breaches, and service disruptions, affecting confidentiality, integrity, and availability of critical systems. Given MongoDB's popularity in sectors such as finance, healthcare, and government across Europe, any compromise could result in regulatory penalties under GDPR due to data exposure. The lack of vendor support and patches increases the risk exposure, as organizations cannot rely on official fixes and must implement alternative mitigation strategies. Additionally, the vulnerability could be leveraged in supply chain attacks or lateral movement within networks, amplifying its impact. The critical severity and network exploitable nature mean that attackers could target exposed services or internal systems without authentication, increasing the attack surface. This is particularly concerning for organizations with legacy systems or those that have not migrated away from BSON::XS to supported libraries, potentially leading to operational disruptions and reputational damage.
Mitigation Recommendations
Given BSON::XS is end-of-life and no patches are available, European organizations should prioritize the following mitigations: 1) Immediate inventory and identification of all Perl applications using BSON::XS and the bundled libbson 1.1.7. 2) Migrate applications to supported BSON libraries or updated MongoDB drivers that do not rely on vulnerable components. 3) Where migration is not immediately feasible, isolate affected systems within segmented network zones with strict access controls to limit exposure. 4) Employ runtime application self-protection (RASP) or Web Application Firewalls (WAFs) with custom rules to detect and block suspicious BSON payloads or malformed data inputs. 5) Monitor network traffic and logs for anomalous activity indicative of exploitation attempts targeting BSON serialization. 6) Conduct code reviews and penetration testing focused on BSON processing to identify and remediate potential exploitation vectors. 7) Engage with security teams to develop incident response plans specific to exploitation of BSON-related vulnerabilities. 8) Educate developers and system administrators about the risks of using deprecated libraries and the importance of timely upgrades. These steps go beyond generic advice by focusing on practical, actionable measures tailored to the unique challenges posed by an unsupported library with no available patches.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Poland
CVE-2025-40906: CWE-1395 Dependency on Vulnerable Third-Party Component in MONGODB 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
Technical Analysis
CVE-2025-40906 is a critical vulnerability affecting BSON::XS, the Perl XS implementation of MongoDB's BSON serialization library. Specifically, 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 expose the library to severe security risks including buffer overflows (CWE-122), integer overflows (CWE-190), use of vulnerable third-party components (CWE-1395), and improper control of code generation (CWE-1104). The bundled libbson 1.1.7 is outdated and no longer maintained, and BSON::XS itself reached end-of-life status as of August 13, 2020, meaning no official patches or support are available. The CVSS 3.1 base score of 9.8 reflects the critical nature of this vulnerability, with an attack vector that is network accessible, no privileges or user interaction required, and impacts confidentiality, integrity, and availability. Exploitation could allow remote attackers to execute arbitrary code, cause denial of service, or compromise sensitive data by exploiting memory corruption and logic errors in BSON processing. Although no known exploits are currently reported in the wild, the presence of multiple severe underlying vulnerabilities in a widely used serialization library for MongoDB data formats makes this a significant threat, especially for legacy Perl applications still relying on BSON::XS. Organizations using BSON::XS should consider the risk of continued use of this deprecated library and the bundled vulnerable libbson component.
Potential Impact
For European organizations, the impact of this vulnerability can be substantial, particularly for those relying on Perl applications that utilize BSON::XS for MongoDB data serialization. Exploitation could lead to remote code execution, data breaches, and service disruptions, affecting confidentiality, integrity, and availability of critical systems. Given MongoDB's popularity in sectors such as finance, healthcare, and government across Europe, any compromise could result in regulatory penalties under GDPR due to data exposure. The lack of vendor support and patches increases the risk exposure, as organizations cannot rely on official fixes and must implement alternative mitigation strategies. Additionally, the vulnerability could be leveraged in supply chain attacks or lateral movement within networks, amplifying its impact. The critical severity and network exploitable nature mean that attackers could target exposed services or internal systems without authentication, increasing the attack surface. This is particularly concerning for organizations with legacy systems or those that have not migrated away from BSON::XS to supported libraries, potentially leading to operational disruptions and reputational damage.
Mitigation Recommendations
Given BSON::XS is end-of-life and no patches are available, European organizations should prioritize the following mitigations: 1) Immediate inventory and identification of all Perl applications using BSON::XS and the bundled libbson 1.1.7. 2) Migrate applications to supported BSON libraries or updated MongoDB drivers that do not rely on vulnerable components. 3) Where migration is not immediately feasible, isolate affected systems within segmented network zones with strict access controls to limit exposure. 4) Employ runtime application self-protection (RASP) or Web Application Firewalls (WAFs) with custom rules to detect and block suspicious BSON payloads or malformed data inputs. 5) Monitor network traffic and logs for anomalous activity indicative of exploitation attempts targeting BSON serialization. 6) Conduct code reviews and penetration testing focused on BSON processing to identify and remediate potential exploitation vectors. 7) Engage with security teams to develop incident response plans specific to exploitation of BSON-related vulnerabilities. 8) Educate developers and system administrators about the risks of using deprecated libraries and the importance of timely upgrades. These steps go beyond generic advice by focusing on practical, actionable measures tailored to the unique challenges posed by an unsupported library with no available patches.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
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: 9/12/2025, 11:50:26 PM
Last updated: 9/20/2025, 6:17:44 PM
Views: 35
Related Threats
CVE-2025-11034: Path Traversal in Dibo Data Decision Making System
MediumCVE-2025-11035: XML External Entity Reference in Jinher OA
MediumCVE-2025-58384: n/a
CriticalCVE-2025-11033: SQL Injection in kidaze CourseSelectionSystem
MediumCVE-2025-56383: n/a
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.