MongoBleed Alert: Critical Flaw Leaking Your Database Secrets
A critical vulnerability has been discovered in MongoDB that allows a remote attacker to access uninitialized server memory without any form of authentication. Assigned the identifier CVE-2025-14847, the flaw carries a CVSS score of 8.7, placing it firmly in the high-severity category.
The issue stems from improper handling of data length parameters. Under certain conditions, the server incorrectly correlates the length value specified in a message header with the actual size of the transmitted data. Specifically, the flaw affects the data exchange protocol when Zlib compression is enabled: if the length fields in the compressed header do not match the true content size, MongoDB may return a portion of memory that was never initialized.
Put simply, a specially crafted request can read fragments of the server’s RAM without undergoing any authentication process. Such leaked data may include internal process state, pointers, auxiliary structures, or other sensitive information that could significantly facilitate subsequent attacks.
The vulnerability affects a broad range of MongoDB Server versions:
• 8.2 branch: versions 8.2.0 through 8.2.3
• 8.0 branch: versions 8.0.0 through 8.0.16
• 7.0 branch: versions 7.0.0 through 7.0.26
• 6.0 branch: versions 6.0.0 through 6.0.26
• 5.0 branch: versions 5.0.0 through 5.0.31
• 4.4 branch: versions 4.4.0 through 4.4.29
• All MongoDB Server releases in the 4.2, 4.0, and 3.6 series
The developers have already released updates that fully remediate the issue. Fixed versions include 8.2.3, 8.0.17, 7.0.28, 6.0.27, 5.0.32, and 4.4.30. MongoDB emphasizes that exploitation is possible entirely from the client side and requires no credentials, making prompt patching strongly recommended.
If an immediate upgrade is not feasible, the developers suggest a temporary mitigation: disabling Zlib compression on the server. This can be done at startup by explicitly removing Zlib from the networkMessageCompressors or net.compression.compressors settings when launching mongod or mongos. Alternative compression algorithms, such as Snappy and Zstandard (zstd), remain supported and are not affected by this vulnerability.
According to the OP Innovate team, the flaw enables a remote attacker to induce conditions under which a MongoDB server returns contents from its heap memory. Even if the leak does not directly expose user data, such information can substantially lower the barrier to more advanced exploitation and increase the reliability of subsequent attacks.
Support Our Threat Intelligence
If you find our technology report and cybersecurity news helpful, consider supporting our work.