CVE-2026-4358: CWE-415 Double free in MongoDB Inc MongoDB Server
A specially crafted aggregation query with $lookup by an authenticated user with write privileges can cause a double-free or use-after-free memory issue in the slot-based execution (SBE) engine when an in-memory hash table is spilled to disk.
AI Analysis
Technical Summary
CVE-2026-4358 is a vulnerability classified under CWE-415 (Double Free) affecting MongoDB Server versions 7.0, 8.0, and 8.2. The issue occurs within the slot-based execution (SBE) engine, specifically when executing aggregation queries that use the $lookup operator. When an authenticated user with write privileges issues a specially crafted aggregation query, the in-memory hash table used by the SBE engine may be spilled to disk. During this spill process, a double-free or use-after-free memory corruption can occur. This type of memory corruption can lead to undefined behavior, including application crashes or potential exploitation to execute arbitrary code or escalate privileges, although no such exploits are currently known. The vulnerability requires network access and authenticated write privileges but does not require user interaction. The CVSS 4.0 vector indicates a network attack vector (AV:N), high attack complexity (AC:H), low privileges required (PR:L), no user interaction (UI:N), and impacts confidentiality, integrity, and availability to a limited degree. The vulnerability is significant because MongoDB is widely used in enterprise and cloud environments for database management, and memory corruption vulnerabilities can be leveraged for severe attacks if exploited. No official patches are listed yet, so mitigation currently relies on access control and monitoring.
Potential Impact
The potential impact of CVE-2026-4358 includes denial of service (DoS) due to application crashes stemming from memory corruption. More severe impacts could arise if attackers manage to leverage the double-free or use-after-free conditions to execute arbitrary code or escalate privileges within the MongoDB server process. This could lead to unauthorized data access, data corruption, or disruption of database services. Since the vulnerability requires authenticated write privileges, the risk is somewhat mitigated by access controls, but insider threats or compromised credentials could enable exploitation. Organizations relying heavily on MongoDB for critical applications, especially those exposing database interfaces over networks, face risks of service disruption and potential data integrity issues. The medium CVSS score reflects that while exploitation is not trivial, the consequences could be significant in sensitive environments. The absence of known exploits in the wild reduces immediate risk but does not eliminate the threat as attackers may develop exploits over time.
Mitigation Recommendations
Organizations should implement the following specific mitigations: 1) Restrict write privileges strictly to trusted and authenticated users to minimize the attack surface. 2) Monitor and audit aggregation queries, especially those using $lookup, for unusual or suspicious patterns that could indicate exploitation attempts. 3) Employ network segmentation and firewall rules to limit access to MongoDB servers from untrusted networks. 4) Apply principle of least privilege to database users and roles to reduce the impact of compromised credentials. 5) Stay informed about MongoDB vendor advisories and apply security patches promptly once they become available. 6) Consider deploying runtime memory protection tools or sandboxing MongoDB processes to mitigate potential exploitation of memory corruption. 7) Conduct regular security assessments and penetration testing focused on database security to detect potential misuse of aggregation queries. These steps go beyond generic advice by focusing on query monitoring, strict privilege management, and proactive patch management tailored to this vulnerability's characteristics.
Affected Countries
United States, Germany, United Kingdom, Japan, South Korea, Canada, Australia, France, Netherlands, India
CVE-2026-4358: CWE-415 Double free in MongoDB Inc MongoDB Server
Description
A specially crafted aggregation query with $lookup by an authenticated user with write privileges can cause a double-free or use-after-free memory issue in the slot-based execution (SBE) engine when an in-memory hash table is spilled to disk.
AI-Powered Analysis
Technical Analysis
CVE-2026-4358 is a vulnerability classified under CWE-415 (Double Free) affecting MongoDB Server versions 7.0, 8.0, and 8.2. The issue occurs within the slot-based execution (SBE) engine, specifically when executing aggregation queries that use the $lookup operator. When an authenticated user with write privileges issues a specially crafted aggregation query, the in-memory hash table used by the SBE engine may be spilled to disk. During this spill process, a double-free or use-after-free memory corruption can occur. This type of memory corruption can lead to undefined behavior, including application crashes or potential exploitation to execute arbitrary code or escalate privileges, although no such exploits are currently known. The vulnerability requires network access and authenticated write privileges but does not require user interaction. The CVSS 4.0 vector indicates a network attack vector (AV:N), high attack complexity (AC:H), low privileges required (PR:L), no user interaction (UI:N), and impacts confidentiality, integrity, and availability to a limited degree. The vulnerability is significant because MongoDB is widely used in enterprise and cloud environments for database management, and memory corruption vulnerabilities can be leveraged for severe attacks if exploited. No official patches are listed yet, so mitigation currently relies on access control and monitoring.
Potential Impact
The potential impact of CVE-2026-4358 includes denial of service (DoS) due to application crashes stemming from memory corruption. More severe impacts could arise if attackers manage to leverage the double-free or use-after-free conditions to execute arbitrary code or escalate privileges within the MongoDB server process. This could lead to unauthorized data access, data corruption, or disruption of database services. Since the vulnerability requires authenticated write privileges, the risk is somewhat mitigated by access controls, but insider threats or compromised credentials could enable exploitation. Organizations relying heavily on MongoDB for critical applications, especially those exposing database interfaces over networks, face risks of service disruption and potential data integrity issues. The medium CVSS score reflects that while exploitation is not trivial, the consequences could be significant in sensitive environments. The absence of known exploits in the wild reduces immediate risk but does not eliminate the threat as attackers may develop exploits over time.
Mitigation Recommendations
Organizations should implement the following specific mitigations: 1) Restrict write privileges strictly to trusted and authenticated users to minimize the attack surface. 2) Monitor and audit aggregation queries, especially those using $lookup, for unusual or suspicious patterns that could indicate exploitation attempts. 3) Employ network segmentation and firewall rules to limit access to MongoDB servers from untrusted networks. 4) Apply principle of least privilege to database users and roles to reduce the impact of compromised credentials. 5) Stay informed about MongoDB vendor advisories and apply security patches promptly once they become available. 6) Consider deploying runtime memory protection tools or sandboxing MongoDB processes to mitigate potential exploitation of memory corruption. 7) Conduct regular security assessments and penetration testing focused on database security to detect potential misuse of aggregation queries. These steps go beyond generic advice by focusing on query monitoring, strict privilege management, and proactive patch management tailored to this vulnerability's characteristics.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mongodb
- Date Reserved
- 2026-03-17T18:55:18.644Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69b9aedc771bdb1749d15207
Added to database: 3/17/2026, 7:43:24 PM
Last enriched: 3/17/2026, 8:03:44 PM
Last updated: 3/17/2026, 10:25:24 PM
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.