Skip to main content

CVE-2025-6710: CWE-674: Uncontrolled Recursion in MongoDB Inc MongoDB Server

High
VulnerabilityCVE-2025-6710cvecve-2025-6710cwe-674
Published: Thu Jun 26 2025 (06/26/2025, 14:09:29 UTC)
Source: CVE Database V5
Vendor/Project: MongoDB Inc
Product: MongoDB Server

Description

MongoDB Server may be susceptible to stack overflow due to JSON parsing mechanism, where specifically crafted JSON inputs may induce unwarranted levels of recursion, resulting in excessive stack space consumption. Such inputs can lead to a stack overflow that causes the server to crash which could occur pre-authorisation. This issue affects MongoDB Server v7.0 versions prior to 7.0.17 and MongoDB Server v8.0 versions prior to 8.0.5. The same issue affects MongoDB Server v6.0 versions prior to 6.0.21, but an attacker can only induce denial of service after authenticating.

AI-Powered Analysis

AILast updated: 06/26/2025, 14:35:05 UTC

Technical Analysis

CVE-2025-6710 is a high-severity vulnerability affecting MongoDB Server versions 6.0 (prior to 6.0.21), 7.0 (prior to 7.0.17), and 8.0 (prior to 8.0.5). The vulnerability arises from an uncontrolled recursion issue in the JSON parsing mechanism of the MongoDB Server. Specifically crafted JSON inputs can trigger excessive recursive calls during parsing, leading to excessive consumption of stack space. This results in a stack overflow condition that causes the MongoDB server process to crash, effectively leading to a denial of service (DoS). Notably, for versions 7.0 and 8.0, this vulnerability can be exploited without any authentication or user interaction, making it remotely exploitable over the network by unauthenticated attackers. For version 6.0, exploitation requires prior authentication, limiting the attack surface somewhat. The underlying weakness is classified under CWE-674 (Uncontrolled Recursion), which indicates that the software does not properly limit the depth of recursive calls, allowing crafted inputs to exhaust stack resources. The CVSS v3.1 base score is 7.5, reflecting a high severity due to the network attack vector, low attack complexity, no privileges required, and no user interaction needed, with impact limited to availability (server crash). No known exploits are currently reported in the wild, but the vulnerability is publicly disclosed and patched in the specified versions. The lack of patch links in the provided data suggests users should consult official MongoDB advisories for updates. This vulnerability poses a significant risk to MongoDB deployments exposed to untrusted networks or users, as it can be leveraged to disrupt database availability and potentially impact dependent applications and services.

Potential Impact

For European organizations relying on MongoDB Server for critical data storage and application backend services, this vulnerability presents a substantial risk of service disruption. Since the vulnerability can be exploited remotely without authentication on recent major versions (7.0 and 8.0), attackers could induce denial of service conditions, causing database crashes and downtime. This can lead to operational interruptions, loss of availability of business-critical applications, and potential cascading effects on dependent systems. Organizations in sectors such as finance, healthcare, telecommunications, and public services, which often deploy MongoDB for scalable data management, may face increased risk of service outages. Additionally, the requirement for authentication in version 6.0 reduces risk but does not eliminate it, especially in environments with weak access controls. Given the widespread adoption of MongoDB across Europe, the vulnerability could be exploited by threat actors aiming to disrupt services or as part of multi-stage attacks. The lack of known exploits in the wild currently reduces immediate risk, but the public disclosure and high severity score necessitate prompt remediation to prevent future exploitation. The vulnerability does not impact confidentiality or integrity directly but severely affects availability, which can have significant business impact.

Mitigation Recommendations

European organizations should immediately assess their MongoDB Server deployments to identify affected versions (6.0 prior to 6.0.21, 7.0 prior to 7.0.17, and 8.0 prior to 8.0.5). The primary mitigation is to apply the official patches provided by MongoDB Inc as soon as they are available. Until patches are applied, organizations should implement network-level protections such as firewall rules to restrict access to MongoDB ports (default 27017) to trusted hosts only, minimizing exposure to untrusted networks. Deploying Web Application Firewalls (WAFs) or Intrusion Prevention Systems (IPS) with signatures or anomaly detection for unusual JSON payloads may help detect or block exploit attempts. For version 6.0 deployments, enforcing strong authentication and access controls reduces risk. Monitoring MongoDB server logs for crashes or unusual JSON parsing errors can provide early warning of exploitation attempts. Additionally, organizations should review and harden their MongoDB configurations, disabling unnecessary network exposure and enabling authentication and encryption where possible. Regular backups and tested recovery procedures are essential to mitigate impact from potential denial of service incidents. Finally, staying informed through MongoDB security advisories and threat intelligence feeds will help maintain timely defenses.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
mongodb
Date Reserved
2025-06-26T11:38:14.955Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 685d570dca1063fb8741f4a3

Added to database: 6/26/2025, 2:19:57 PM

Last enriched: 6/26/2025, 2:35:05 PM

Last updated: 8/16/2025, 2:14:05 PM

Views: 38

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