TL;DR
MongoBleed (CVE-2025-14847) is a zlib compression bug in MongoDB that can let unauthenticated attackers read uninitialized heap memory. The flaw affects MongoDB releases going back to about 2017 and has a patch in recent builds, though some EOL branches will not receive fixes.
What happened
Researchers disclosed CVE-2025-14847, a vulnerability in MongoDB’s zlib1 message compression path that can cause the server to reveal arbitrary contents of heap memory. An attacker sends a compressed OP_COMPRESSED message with a deliberately incorrect uncompressedSize field; the server allocates a large buffer based on that value but does not validate the actual decompressed length. If the supplied BSON payload omits the expected null terminator for field names, the server’s BSON parser will continue scanning into the over-allocated buffer until it finds a terminator. Because MongoDB is implemented in C++, that extra space can contain leftover, uninitialized heap bytes from prior operations — potentially including passwords, API keys, session tokens, PII and other sensitive items. The bug can be triggered without authenticating to the server. A one-line code fix was committed in mid-December 2025 and MongoDB released version 8.0.17 containing the fix; some older, end-of-life releases will not be patched.
Why it matters
- Pre-auth data exposure: the vulnerability is exploitable before authentication, so any reachable server is at risk.
- Large attack surface: the bug affects MongoDB versions dating back to around 2017.
- Sensitive leaks: uninitialized heap memory can contain credentials, API keys, customer data and system details.
- Simple exploitation: the attack relies on malformed compressed requests and trivial parsing behavior.
- Operational risk: many MongoDB instances are publicly reachable — the source cites over 213,000 exposed databases.
Key facts
- CVE identifier: CVE-2025-14847.
- Root cause: bug in the zlib1 message compression/decompression path used by MongoDB.
- Affected range: essentially all MongoDB versions since about 2017 (introduced by a 2017 commit).
- Exploit mechanism: attacker sends an OP_COMPRESSED message with a false uncompressedSize and a specially crafted BSON payload that lacks a null terminator.
- Result: server allocates a larger buffer and may return uninitialized heap bytes when parsing field names.
- Authentication: exploitation can occur without authenticating to the database.
- Patch status: MongoDB 8.0.17 was released containing the fix; a patch commit was authored Dec 17, 2025 and merged on Dec 22, 2025 according to the source.
- EOL branches: some end-of-life releases (3.6, 4.0, 4.2) will not be patched, per the source.
- Mitigations: updating to patched builds or disabling zlib network compression are effective short-term mitigations.
What to watch next
- Monitor official MongoDB communications for confirmation of exploit attempts and any expanded patch guidance.
- Check inventories for publicly reachable MongoDB instances and prioritize patching or disabling zlib compression.
- not confirmed in the source: whether retrospective forensic evidence of exploitation exists beyond MongoDB’s statement.
- not confirmed in the source: full details on which downstream distributions or managed services will backport fixes.
Quick glossary
- zlib: A common library for data compression and decompression, often used to reduce message sizes over the network.
- heap memory: The region of process memory used for dynamic allocation; contents can persist between different allocations unless explicitly overwritten.
- BSON: A binary-encoded serialization format used by MongoDB to represent documents; it is similar to JSON but optimized for speed and space.
- OP_COMPRESSED / OP_MSG: Elements of MongoDB’s wire protocol: OP_MSG is the general operation message, and OP_COMPRESSED wraps a compressed OP_MSG payload.
- null-terminated string: A string representation in C where a zero byte () marks the end of the text; parsing reads until this terminator is found.
Reader FAQ
Which MongoDB versions are vulnerable?
The source says versions going back to about 2017 are affected; MongoDB 8.0.17 contains the fix and some EOL branches (3.6, 4.0, 4.2) will not be patched.
Do attackers need credentials to exploit this?
No — the vulnerability can be triggered prior to authentication, according to the source.
How can I mitigate the issue right away?
Per the source, you can apply patched builds or disable zlib network compression as a short-term mitigation.
Has MongoDB confirmed exploitation in the wild?
MongoDB has said it has no evidence of exploitation so far, as reported in the source.

MongoBleed explained simply CVE-2025-14847 allows attackers to read any arbitrary data from the database's heap memory. It affects all MongoDB versions since 2017, here's how it works: STANISLAV KOZLOVSKI DEC…
Sources
- MongoBleed Explained Simply
- MongoBleed: MongoDB Zlib Vulnerability (CVE-2025-14847)
- MongoDB Unauthenticated Attacker Sensitive Memory Leak
- CVE-2025-14847 Detail – NVD
Related posts
- Illinois driver charged after pedestrian killed during TikTok livestream
- Ubisoft shuts Rainbow Six Siege servers after hackers give players 2B credits
- 2025 saw cybercrime turn physically violent: deaths, kidnappings and amputations