A high-severity vulnerability in the MongoDB Server—tracked as CVE-2025-14847 and colloquially dubbed MongoBleed—is being actively exploited in the wild. The flaw affects the database’s zlib compression handling in the network protocol layer, enabling unauthenticated remote attackers to trigger memory leakage and extract sensitive in-memory data without valid credentials.
Risk Profile:
- Attack vector: unauthenticated, network-accessible MongoDB instances.
- Complexity: low (no authentication or user interaction required).
- Impact: disclosure of uninitialized heap memory, potentially containing passwords, API keys, tokens, and other sensitive data.
Root Cause:
The vulnerability lies in the zlib decomposition logic in message_compressor_zlib.cpp, where MongoDB erroneously returns the allocated buffer size (output.length()) instead of the actual decompressed data length. When attackers send malformed compressed packets, this can cause the server to return adjacent heap memory content that was never initialized for client consumption.
Affected Versions:
The flaw impacts a broad range of official MongoDB Server releases, spanning multiple major branches going back to v3.6, including:
- 8.2.0–8.2.2
- 8.0.0–8.0.16
- 7.0.0–7.0.26
- 6.0.0–6.0.26
- 5.0.0–5.0.31
- 4.4.0–4.4.29
- All versions of 4.2, 4.0, and 3.6 branches
Observed Exploitation:
- Proof-of-concept exploit code is publicly available and being used against exposed servers.
- Estimates indicate tens of thousands of unpatched servers are reachable on the public internet, with some external scans identifying ~87,000 exposed instances globally and other analyses suggesting larger counts.
Exploitation Impact:
Once exploited, the vulnerability can result in exfiltration of in-memory data, including but not limited to session tokens, credentials, internal state, and other sensitive database contents. Because attack execution occurs before authentication, standard access controls do not mitigate the initial memory leak vector.
Patch and Mitigation:
MongoDB has released patched builds for all supported major versions; administrators should upgrade immediately to the following versions:
- 8.2.3
- 8.0.17
- 7.0.28
- 6.0.27
- 5.0.32
- 4.4.30
MongoDB Atlas cloud instances have reportedly been patched automatically.
Temporary Workarounds (if patching is delayed):
- Disable zlib compression on the MongoDB server by explicitly omitting it from
networkMessageCompressorsornet.compression.compressorsconfigurations. - Restrict network exposure (e.g., firewall rules) to trusted hosts only.
Operational and Security Recommendations:
- Audit all MongoDB deployments (self-hosted and containerized) for affected versions.
- Apply mitigations immediately (patch first; backup and test in staging beforehand).
- Verify external exposure and restrict listener interfaces to internal networks.
- Monitor threat feeds and Censys/Shodan scans for exposed instances.
- Rotated credentials or tokens possibly exposed during exploitation campaigns.
CVE-2025-14847 (“MongoBleed”) represents a significant information disclosure vulnerability due to flawed zlib compression handling in MongoDB. Its unauthenticated, remote exploitability on internet-accessible deployments amplifies risk. Immediate patching and configuration mitigation are essential to prevent sensitive memory leakage and follow-on compromise.
