CVE-2026-4147: 
MongoDB vulnerability analysis and mitigation

Overview

CVE-2026-4147 is an uninitialized stack memory disclosure vulnerability in MongoDB Server that allows an authenticated user with the read role to read limited amounts of uninitialized stack memory via specially-crafted issuances of the filemd5 command. It affects MongoDB versions 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. The vulnerability was published on March 17, 2026, and patches were made available shortly after. It carries a CVSS v3.1 base score of 4.3 (Medium) and a CVSS v4.0 base score of 7.1 (High) (Red Hat Advisory, MongoDB Jira).

Technical details

The root cause is classified under CWE-457 (Use of Uninitialized Variable) and CWE-908 (Use of Uninitialized Resource). When a specially-crafted filemd5 command is issued, the MongoDB server processes the request without properly initializing certain stack memory regions, allowing portions of that memory to be returned to the caller. Exploitation requires only network access and a valid account with the read role — no elevated privileges, user interaction, or complex conditions are needed (MongoDB Jira, Red Hat Advisory).

Impact

Successful exploitation could expose sensitive data residing in uninitialized stack memory, potentially including encryption keys, credentials, or other confidential information processed by the MongoDB server. The confidentiality impact is rated High under CVSS v4.0, with no integrity or availability impact. While the amount of memory disclosed per request is limited, repeated exploitation could allow an attacker to accumulate meaningful sensitive data over time (Red Hat Advisory, IBM Advisory).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time (MongoDB Jira). The EPSS score is approximately 0.031%, reflecting a low probability of near-term exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported.

Exploitation steps

  1. Reconnaissance: Identify MongoDB instances running affected versions (7.0.0–7.0.30, 8.0.0–8.0.19, 8.2.0–8.2.5, or 8.3.0 alpha/rc) exposed on the network, using tools such as Shodan or Nessus (plugin 303006).
  2. Obtain read credentials: Acquire valid MongoDB credentials with at minimum the read role on any database — this could be through credential theft, phishing, or use of a low-privilege account.
  3. Connect to MongoDB: Establish a connection to the target MongoDB instance using a standard MongoDB client or driver.
  4. Issue crafted filemd5 command: Send a specially-crafted filemd5 command designed to trigger the uninitialized stack memory read path in the server.
  5. Collect disclosed memory: Parse the server's response to extract uninitialized stack memory contents, potentially revealing sensitive data such as keys or credentials residing in memory at the time of the request.
  6. Repeat as needed: Issue additional crafted commands to accumulate further memory disclosures (MongoDB Jira, Red Hat Advisory).

Indicators of compromise

  • Logs: Unusual or repeated filemd5 command invocations in MongoDB audit logs, particularly from accounts that do not normally use this command; commands issued with atypical or malformed parameters.
  • Network: Unexpected network connections to MongoDB ports (default 27017) from unfamiliar source IPs or hosts; elevated query rates from a single authenticated user.
  • Process: Anomalous memory access patterns or errors logged by the MongoDB process related to the filemd5 operation.

Mitigation and workarounds

MongoDB has released patched versions addressing this vulnerability: 7.0.31 for the 7.0.x branch, 8.0.20 for the 8.0.x branch, and 8.2.6 for the 8.2.x branch; users on 8.3.0 alpha/rc builds should upgrade to updated releases (MongoDB Jira). As interim mitigations, restrict the read role to only trusted and necessary users, apply network segmentation to limit exposure of MongoDB services, and monitor audit logs for unusual filemd5 command usage. IBM Cloud Pak for AIOps users should refer to the IBM advisory for product-specific guidance (IBM Advisory).

Community reactions

Red Hat has published a security advisory tracking this CVE for its products (Red Hat Advisory). IBM issued an advisory covering the impact on IBM Cloud Pak for AIOps (IBM Advisory). Splunk also published an advisory referencing this vulnerability (Splunk Advisory). No notable independent researcher commentary or significant social media discussion has been identified.

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

Source: This report was generated using AI

Related MongoDB vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-96299HIGH7.1
  • MongoDB logoMongoDB
  • mongodb
NoYesOct 13, 2026
CVE-2026-104005HIGH7.1
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesOct 13, 2026
CVE-2026-104004HIGH7.1
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesOct 13, 2026
CVE-2026-96297MEDIUM6
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesOct 13, 2026
CVE-2026-103965MEDIUM5.3
  • MongoDB logoMongoDB
  • cpe:2.3:a:mongodb:mongodb
NoYesOct 13, 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

Additional Wiz resources

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