CVE-2025-14847, widely known as “MongoBleed,” is a critical unauthenticated memory disclosure vulnerability in MongoDB Server. Disclosed in late December 2025, the flaw allows remote attackers to “bleed” sensitive information directly from a server’s heap memory without needing a username or password. This vulnerability is reminiscent of the infamous Heartbleed bug due to its ability to leak high-value secrets through malformed network packets.
Key aspects of the vulnerability:
Attack Mechanism: The flaw exists in the MongoDB Server’s message_compressor_zlib.cpp component, which handles zlib-compressed network messages. An attacker sends a specially crafted, compressed network packet with mismatched length fields—specifically, an “uncompressed size” header that is much larger than the actual data. Because the server trusts this header, it allocates an oversized buffer and then returns the entire buffer to the client, including uninitialized heap memory (“dirty memory”) adjacent to the actual data.
Impact:
Successful exploitation allows an unauthenticated attacker to remotely extract fragments of the server’s memory. This leaked data often contains:
- Cleartext database credentials and passwords.
- Cloud API keys (e.g., AWS, Azure, GCP).
- Session tokens and Personally Identifiable Information (PII).
- Internal configuration details and metadata.
How bad is this?
According to the National Vulnerability Database (NVD) and vendor advisories, CVE-2025-14847 has a CVSS 4.0 Base Score of 8.7 (HIGH). It has been added to CISA’s Known Exploited Vulnerabilities (KEV) catalog, signaling active exploitation in the wild.
| Severity: | Critical (due to ease of exploitation and data sensitivity) |
| Authentication: | Not Required (Unauthenticated) |
| Complexity: | Low |
| Exploitation: | Active (Public PoCs available) |
Who is affected by this?
The vulnerability affects MongoDB Server instances where zlib compression is enabled (which is the default setting). Affected versions include:
- MongoDB Server 8.2.x (prior to 8.2.3)
- MongoDB Server 8.0.x (prior to 8.0.17)
- MongoDB Server 7.0.x (prior to 7.0.28)
- MongoDB Server 6.0.x (prior to 6.0.27)
- MongoDB Server 5.0.x (prior to 5.0.32)
- MongoDB Server 4.4.x (prior to 4.4.30)
- Legacy EOL Versions: All versions of 4.2.x, 4.0.x, and 3.6.x are considered vulnerable and will not receive official patches.
How is it exploited?
This vulnerability is exploited remotely over the network (typically via port 27017). Attackers use automated scripts to flood the target with malformed compressed requests, scraping large amounts of RAM over time to harvest credentials. Because the attack occurs prior to authentication, there are no login logs to trigger traditional brute-force alerts.
How do I protect myself?
The primary remediation is to patch immediately to the fixed versions released by MongoDB (e.g., v8.0.17, v7.0.28, etc.).
Immediate Workaround:
If patching is not immediately possible, you can disable zlib compression by starting mongod or mongos without the zlib compressor:
mongod --setParameter networkMessageCompressors=snappy,zstd (or disabled)
Mitigating factors?
Instances that have disabled zlib compression or are restricted to trusted IP addresses via firewalls/VPNs are at significantly lower risk. However, because this flaw allows for the theft of credentials, patching is only the first step. After securing the server, you must rotate all secrets (passwords, API keys, tokens) that were resident in memory, as they should be considered compromised.