Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-0755: CWE-122: Heap-based Buffer Overflow in MongoDB Inc libbson

0
High
VulnerabilityCVE-2025-0755cvecve-2025-0755cwe-122
Published: Tue Mar 18 2025 (03/18/2025, 09:01:04 UTC)
Source: CVE
Vendor/Project: MongoDB Inc
Product: libbson

Description

The various bson_append functions in the MongoDB C driver library may be susceptible to buffer overflow when performing operations that could result in a final BSON document which exceeds the maximum allowable size (INT32_MAX), resulting in a segmentation fault and possible application crash. This issue affected libbson versions prior to 1.27.5, MongoDB Server v8.0 versions prior to 8.0.1 and MongoDB Server v7.0 versions prior to 7.0.16

AI-Powered Analysis

AILast updated: 11/03/2025, 20:15:59 UTC

Technical Analysis

CVE-2025-0755 is a heap-based buffer overflow vulnerability identified in the libbson component of MongoDB's C driver library. The vulnerability occurs in various bson_append functions when they handle BSON documents that exceed the maximum allowable size defined by INT32_MAX (2,147,483,647 bytes). When such oversized BSON documents are constructed, the internal buffer allocation and management logic fails to properly handle the size, leading to a heap overflow. This overflow can cause segmentation faults, resulting in application crashes and potentially enabling an attacker to execute arbitrary code or corrupt memory. The affected versions include libbson prior to 1.27.5, MongoDB Server versions 8.0 prior to 8.0.1, and 7.0 prior to 7.0.16. The vulnerability has a CVSS v3.1 base score of 8.4, indicating high severity, with an attack vector limited to local access (AV:L), low attack complexity (AC:L), no privileges required (PR:N), and no user interaction needed (UI:N). The scope is unchanged (S:U), but the impact on confidentiality, integrity, and availability is high (C:H/I:H/A:H). Although no known exploits are currently reported in the wild, the nature of the vulnerability suggests that exploitation could lead to denial of service or remote code execution if combined with other vulnerabilities or misconfigurations. The issue was reserved in January 2025 and publicly disclosed in March 2025. MongoDB is widely used in enterprise and cloud environments, making this vulnerability significant for organizations relying on these technologies.

Potential Impact

For European organizations, the impact of CVE-2025-0755 can be substantial. MongoDB is commonly used in sectors such as finance, telecommunications, government, and technology across Europe. A successful exploitation could lead to application crashes causing denial of service, disrupting critical business operations and services. More severe exploitation could allow attackers to execute arbitrary code, leading to data breaches, unauthorized data manipulation, or lateral movement within networks. This compromises confidentiality, integrity, and availability of sensitive data and systems. Given the local attack vector, attackers would need some form of access to the affected system, which could be achieved through compromised user accounts or insider threats. Organizations running vulnerable MongoDB versions in production environments, especially those processing large BSON documents or handling critical data, face elevated risks. The disruption could affect customer trust, regulatory compliance (e.g., GDPR), and financial stability. Additionally, the lack of known exploits in the wild does not preclude future attacks, emphasizing the need for proactive mitigation.

Mitigation Recommendations

1. Immediately upgrade all MongoDB Server instances to version 8.0.1 or later (for 8.0 branch) and 7.0.16 or later (for 7.0 branch), and upgrade libbson to version 1.27.5 or later. 2. Audit application code to identify and limit BSON document sizes, ensuring they do not approach or exceed the INT32_MAX limit. 3. Implement strict access controls and monitoring to prevent unauthorized local access to MongoDB servers, reducing the risk of exploitation given the local attack vector. 4. Employ runtime application self-protection (RASP) or memory protection tools to detect and prevent heap overflows at runtime. 5. Conduct thorough testing of applications interacting with MongoDB to detect abnormal crashes or memory corruption symptoms. 6. Review and enhance logging and alerting mechanisms to detect anomalous behavior indicative of exploitation attempts. 7. Educate developers and system administrators about the vulnerability and the importance of timely patching. 8. If immediate patching is not feasible, consider isolating MongoDB instances and restricting BSON document sizes via application-level validation as a temporary mitigation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
mongodb
Date Reserved
2025-01-27T16:13:12.042Z
Cisa Enriched
true

Threat ID: 682d9840c4522896dcbf15da

Added to database: 5/21/2025, 9:09:20 AM

Last enriched: 11/3/2025, 8:15:59 PM

Last updated: 11/22/2025, 3:01:31 PM

Views: 33

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

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