
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-4358 is a double-free/use-after-free memory corruption vulnerability in MongoDB's slot-based execution (SBE) engine, triggered by a specially crafted aggregation query using $lookup. An authenticated user with write privileges can cause the memory issue when an in-memory hash table is spilled to disk during query execution. Affected MongoDB versions include 7.0.0–7.0.30, 8.0.0–8.0.19, and 8.2.0–8.2.5; IBM Cloud Pak for AIOps is also affected as a downstream consumer. The vulnerability was published on March 17, 2026, with a CVSS v3.1 base score of 7.5 (High) (MongoDB JIRA, IBM Advisory).
The root cause is classified as CWE-415 (Double Free): when the SBE engine processes a $lookup aggregation that forces a hash join and the resulting hash table exceeds 100 MB, causing a spill to disk, a duplicate key insertion with a heap-stored value triggers a double-free or use-after-free condition in memory management. The attack vector is network-based, requiring low privileges (authenticated write access) and high attack complexity — specifically, the SBE engine must select hash join, the hash table must exceed 100 MB, and a duplicate key must be encountered during the spill operation. A concrete, reproducible trigger sequence is documented in the MongoDB JIRA issue: db.local.aggregate({$lookup: {from: 'foreign', localField: 'k', foreignField: 'k', as: 'out'}}) under the defined conditions (MongoDB JIRA).
Successful exploitation can allow an authenticated attacker with write privileges to corrupt heap memory, potentially leading to arbitrary code execution with the privileges of the MongoDB server process. This results in high confidentiality, integrity, and availability impact — an attacker could exfiltrate data, tamper with database contents, or crash the database service. In environments where MongoDB runs with elevated OS privileges, exploitation could facilitate lateral movement within the host system (MongoDB JIRA, IBM Advisory).
A proof-of-concept exploit with a concrete, reproducible trigger sequence is publicly documented in the MongoDB JIRA issue (SERVER-118849), with high confidence assessed by Feedly threat intelligence. There is no evidence of in-the-wild exploitation at this time, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.057%, reflecting low but non-zero probability of near-term exploitation. Nessus detection plugins (IDs 303007 and 303196) are available for scanning (MongoDB JIRA).
db.version() with valid credentials.local and foreign) with sufficient data to ensure the hash join hash table will exceed 100 MB during the $lookup operation, and include duplicate keys to trigger the spill condition.db.local.aggregate({$lookup: {from: 'foreign', localField: 'k', foreignField: 'k', as: 'out'}}) — ensuring SBE selects hash join, the hash table exceeds 100 MB, and a duplicate key is present in heap memory at spill time.SIGSEGV, SIGABRT) in the mongod process, particularly following aggregation pipeline execution; log entries referencing SBE engine errors or hash table spill operations.mongod process; child processes spawned by mongod that are not part of normal operation.$lookup stages against collections with high data volumes.--dbpath or --tempPath directory during aggregation operations, particularly at sizes exceeding 100 MB.MongoDB has released patched versions addressing this vulnerability: upgrade to 7.0.31 or later, 8.0.20 or later, or 8.2.6 or later. IBM Cloud Pak for AIOps users should refer to the IBM advisory for applicable fix guidance. As a workaround where immediate patching is not possible, restrict write privileges to only trusted and necessary users, and consider network segmentation to limit access to MongoDB instances. Monitoring aggregation query patterns for unusual or large $lookup operations can help detect exploitation attempts (MongoDB JIRA, IBM Advisory).
IBM issued a security advisory acknowledging the impact of CVE-2026-4358 on IBM Cloud Pak for AIOps and directing customers to apply fixes (IBM Advisory). Splunk also published an advisory (SVD-2026-0610) referencing this CVE, indicating broader ecosystem impact beyond MongoDB itself. Tenable released Nessus detection plugins (303007, 303196) shortly after disclosure, enabling rapid scanning for vulnerable instances.
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."