Database administrators are facing a critical security emergency after the disclosure of a high-severity vulnerability in MongoDB, one of the industry’s most widely used database systems. The flaw, tracked as CVE-2025-14847, allows remote, unauthenticated attackers to trick the server into revealing sensitive contents from its memory (heap), potentially exposing internal states and pointers.
Security researcher Joe Desimone has published proof-of-concept (PoC) exploit code for the flaw, which carries a CVSS score of 8.7, signaling a high risk to unpatched systems.
The vulnerability lies in how MongoDB handles Zlib compressed protocol headers. It is described as a “improper handling of length parameter inconsistency”. Essentially, the server blindly trusts the length claimed by a client, even when it doesn’t match the actual data size.
The exploit works through a clever five-step process :
- Sending a compressed message with an inflated
uncompressedSizeclaim - MongoDB allocates a large buffer based on the attacker’s claim
- zlib decompresses actual data into the start of the buffer
- The bug causes MongoDB to treat the entire buffer as valid data
- BSON parsing reads “field names” from uninitialized memory until null bytes
“Mismatched length fields in Zlib compressed protocol headers may allow a read of uninitialized heap memory by an unauthenticated client,” the CVE description warns.
The most alarming aspect of CVE-2025-14847 is that it requires no authentication. “An client-side exploit of the Server’s zlib implementation can return uninitialized heap memory without authenticating to the server,” MongoDB confirmed in their advisory.
Experts at OP Innovate noted that this could lead to the “disclosure of sensitive in-memory data, including internal state information, pointers, or other data that may assist an attacker in further exploitation”.
The vulnerability affects a vast range of MongoDB versions, spanning from modern releases back to legacy systems. Affected versions include:
- 8.2.0 through 8.2.3
- 8.0.0 through 8.0.16
- 7.0.0 through 7.0.26
- 6.0.0 through 6.0.26
- 5.0.0 through 5.0.31
- 4.4.0 through 4.4.29
- All versions of 4.2, 4.0, and 3.6
MongoDB has released fixed versions and strongly recommends upgrading immediately. The patched versions are 8.2.3, 8.0.17, 7.0.28, 6.0.27, 5.0.32, and 4.4.30.
For organizations that cannot update right away, a workaround exists: disable Zlib. Administrators can start their mongod or mongos instances with a net.compression.compressors option that explicitly omits Zlib, opting instead for alternatives like snappy or zstd.
With PoC code already available on GitHub, the race is on for defenders to patch their databases before threat actors begin harvesting secrets from the exposed memory of vulnerable servers.
Related Posts:
- Critical Unauthenticated MongoDB Flaw Leaks Sensitive Data via zlib Compression
- MongoDB Patches High-Severity Windows Vulnerability (CVE-2024-7553) in Multiple Products
- Data Breach Alert: MongoDB Customer Hit, Logs Accessed
- MongoDB Patches: DoS & Bypass Risks Addressed
- MongoDB Hit by Pre-Auth Denial of Service Vulnerability