CVE-2026-4148
MongoDB vulnerability analysis and mitigation

Overview

CVE-2026-4148 is a use-after-free vulnerability in MongoDB Server affecting sharded cluster deployments. An authenticated user with only the read role can trigger the flaw by issuing a specially crafted $lookup or $graphLookup aggregation pipeline query. Affected versions include MongoDB 7.0.0–7.0.30, 8.0.0–8.0.19, 8.2.0–8.2.5, and 8.3.0 alpha/RC pre-release builds; IBM Cloud Pak for AIOps is also listed as an affected product. The vulnerability was published on March 17, 2026, and carries a CVSS v3.1 base score of 8.8 (High) and a CVSS v4.0 base score of 8.7 (High) (Red Hat Advisory, MongoDB Jira).

Technical details

The root cause is a use-after-free condition (CWE-416) in MongoDB's aggregation pipeline processing logic within sharded cluster environments. When a user submits a $lookup or $graphLookup stage, the server incorrectly accesses memory that has already been freed, potentially allowing an attacker to influence program control flow or corrupt heap state. The attack vector is network-accessible, requires low privileges (read role), no user interaction, and low attack complexity, making it straightforward to trigger for any authenticated database user. No public proof-of-concept exploit code has been identified at this time (MongoDB Jira, Red Hat Advisory).

Impact

Successful exploitation could result in complete compromise of confidentiality, integrity, and availability of the affected MongoDB sharded cluster node — including unauthorized data access, data modification, and service disruption or crash. Because the vulnerability is reachable by any authenticated user with the minimal read role, the effective attack surface is broad in multi-tenant or shared database environments. Lateral movement within a cluster is plausible if an attacker achieves code execution on a shard or mongos process (Red Hat Advisory, IBM Advisory).

Exploitability

There is currently no public proof-of-concept exploit and no confirmed evidence of in-the-wild exploitation (Red Hat Advisory). The EPSS score is approximately 0.042%, reflecting low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported. A patch has been released by MongoDB, and Tenable has published a detection plugin (Nessus plugin 303024) (Tenable).

Exploitation steps

  1. Reconnaissance: Identify MongoDB sharded cluster deployments (version 7.0.x < 7.0.31, 8.0.x < 8.0.20, or 8.2.x < 8.2.6) exposed on the network, using port scanning (default port 27017) or service enumeration tools.
  2. Obtain credentials: Acquire or use existing credentials for any database user with at minimum the read role on a database within the sharded cluster — this is the only privilege required.
  3. Connect to mongos or shard: Authenticate to the cluster's mongos router or directly to a shard using a MongoDB client (e.g., mongosh, PyMongo, or the official driver).
  4. Craft malicious aggregation pipeline: Construct a $lookup or $graphLookup aggregation pipeline specifically designed to trigger the use-after-free condition in the server's memory management during pipeline execution.
  5. Execute the pipeline: Issue the crafted aggregation query against a collection in the sharded cluster. The use-after-free is triggered server-side, potentially causing a crash (denial of service) or, under favorable memory layout conditions, enabling arbitrary code execution as the MongoDB process user (MongoDB Jira, Red Hat Advisory).

Indicators of compromise

  • Network: Unexpected or repeated aggregation pipeline queries (particularly $lookup or $graphLookup) originating from low-privilege read-only accounts against sharded cluster endpoints (default port 27017/27018/27019).
  • Logs: MongoDB server logs (mongod.log / mongos.log) showing abnormal termination, segmentation faults, or assertion failures during aggregation pipeline execution; repeated failed or unusual queries from the same authenticated user.
  • Process: Unexpected crashes or restarts of mongod or mongos processes; core dump files generated in the MongoDB working directory following aggregation operations.
  • File System: Presence of core dump files (e.g., core.*) in the MongoDB data or log directory following unexpected process termination.

Mitigation and workarounds

MongoDB has released patched versions addressing this vulnerability: 7.0.31, 8.0.20, and 8.2.6; users on 8.3.0 pre-release builds should upgrade to a stable fixed release. IBM has also released a fix for affected Cloud Pak for AIOps versions (IBM Advisory). As interim workarounds, administrators should restrict $lookup and $graphLookup aggregation pipeline operations in sharded cluster environments, limit read role assignments to only necessary users, and implement network-level access controls to restrict who can reach sharded cluster endpoints. Monitoring aggregation pipeline queries for anomalous patterns is also recommended (MongoDB Jira, Red Hat Advisory).

Community reactions

The Hacker Wire published a threat intelligence article specifically covering this vulnerability, highlighting the use-after-free in sharded clusters via aggregation pipelines (The Hacker Wire). VulDB and Mastodon security community accounts noted the disclosure shortly after publication. INCIBE (Spain's national cybersecurity agency) also issued an early warning advisory. Overall community reaction has been measured, consistent with the absence of a public exploit and the requirement for authentication.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Ubuntu

Unknown

bionic (esm-apps)

mongodb

Unknown

focal (esm-apps)

mongodb

Unknown

trusty (esm-infra-legacy)

mongodb

Unknown

xenial (esm-apps-legacy)

mongodb

Unknown

SourceThis report was generated using AI

Related MongoDB vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-82075HIGH8.7
  • MongoDB logoMongoDB
  • mongodb
NoYesSep 08, 2026
CVE-2026-89099HIGH7.7
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesSep 11, 2026
CVE-2026-82076HIGH7.1
  • MongoDB logoMongoDB
  • mongodb
NoYesSep 08, 2026
CVE-2026-82074HIGH7.1
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesSep 08, 2026
CVE-2026-88035MEDIUM5.7
  • MongoDB logoMongoDB
  • mongo-c-driver
NoNoSep 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management