Mongobleed Cve 2025 14847 Critical Unauthenticated Mongodb Memory Disclosure
MongoDB versions with a zlib decompression flaw trust a claimed uncompressed size, causing the BSON parser to read past the real buffer and leak heap memory. An unauthenticated attacker could send crafted compressed messages to disclose sensitive data such as passwords, tokens, and internal system data.
Published on systemweakness.com
I am Sarath D, a cybersecurity professional and security researcher with a strong interest in analyzing security breaches, incidents, and their root causes. My work focuses on deep technical analysis and practical explanations, aimed at helping beginners understand core security concepts and real-world attack…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An unauthenticated attacker could leak sensitive data such as passwords, usernames, tokens, and internal system data from server memory; TLS does not mitigate this and WAFs cannot detect it.
What the attacker needed
Network access to MongoDB port 27017; Vulnerable MongoDB version; No authentication required
The fix
Upgrade to a patched MongoDB version (8.2.3, 8.0.17, 7.0.28, 6.0.27, 5.0.32, or 4.4.30 and later); EOL branches have no fix.
How it was found
- Send a crafted BSON document with an inflated declared length.
- Wrap the BSON in an OP_MSG packet.
- Compress the OP_MSG with zlib and wrap it in an OP_COMPRESSED message with a claimed uncompressed size larger than the real data.
- Send the message to the MongoDB server on port 27017.
- Receive the response and extract leaked memory fragments from BSON error messages.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When a program asks the operating system for memory, it often gets memory that still contains old data from other programs. If the program later sends more of that memory than it should, secrets like passwords or tokens can leak out. This bug in MongoDB does exactly that because it trusts a size value supplied by the attacker.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.