
Mongobleed Detector CVE-2025-14847
A professional vulnerability scanner for CVE-2025-14847 (MongoBleed) - MongoDB Memory Leak Vulnerability.
+================================================================+
| MongoBleed Scanner v1.3.0 |
| CVE-2025-14847 - MongoDB Memory Leak Vulnerability |
+================================================================+
CVE-2025-14847 (MongoBleed) is a critical memory leak vulnerability in MongoDB's zlib compression handling.
When processing compressed messages (OP_COMPRESSED with zlib), MongoDB allocates a buffer based on the uncompressedSize field provided by the client. A malicious client can specify a larger size than the actual data, causing MongoDB to return uninitialized heap memory containing sensitive data from previous operations.
No additional packages required. The scanner uses only Python's standard library.
# Default port (27017)
python scanner.py -t 192.168.1.100
# Custom port
python scanner.py -t 192.168.1.100:27018
# Comma-separated
python scanner.py -t 192.168.1.100,192.168.1.101:27018,db.example.com
# targets.txt (one per line, # for comments)
# 192.168.1.100
# 192.168.1.101:27018
# mongodb.example.com
python scanner.py -f targets.txt
# Plain text
python scanner.py -t 192.168.1.100 -o report.txt
# JSON (detailed)
python scanner.py -t 192.168.1.100 -o report.json
# CSV (spreadsheet)
python scanner.py -t 192.168.1.100 -o report.csv
+================================================================+
| MongoBleed Scanner v1.3.0 |
| CVE-2025-14847 - MongoDB Memory Leak Vulnerability |
+================================================================+
| LEGAL: Authorized security testing only. Obtain permission |
| before scanning systems you do not own. |
+================================================================+
[*] Loaded 4 target(s)
SCAN RESULTS:
----------------------------------------------------------------------
[!] 192.168.1.100:27017 VULNERABLE v8.0.16 zlib:ON -> Update to 8.0.17
[?!] 192.168.1.101:27018 POSSIBLY VULNERABLE v~8.2.x zlib:ON -> Check version, update to 8.2.3
[+] 192.168.1.102:27017 SAFE v8.0.17 zlib:ON
[~] 192.168.1.103:27017 MITIGATED v8.0.16 zlib:OFF (zlib disabled)
======================================================================
SCAN SUMMARY
======================================================================
Total targets scanned: 4
Reachable: 4
Unreachable: 0
----------------------------------------------------------------------
[!] VULNERABLE: 1
[?!] POSSIBLY VULN: 1 (version estimated, needs verification)
[+] SAFE (patched): 1
[~] MITIGATED: 1 (vulnerable version but zlib disabled)
[?] UNKNOWN: 0
======================================================================
VULNERABLE TARGETS REQUIRING IMMEDIATE ACTION:
----------------------------------------------------------------------
192.168.1.100:27017 v8.0.16 zlib:ON -> Upgrade to 8.0.17
v8.0.16 — Exact version detectedv~8.2.x — Estimated from wire protocol (~ indicates estimation)Estimation occurs when MongoDB 8.2+ requires authentication for version commands. Scanner falls back to wire protocol version mapping.
1. TCP Connection
└── Connect to MongoDB port
2. Version Detection
├── Send 'hello' command (get wire version, no auth required)
└── Send 'buildInfo' command (get exact version, may need auth)
3. Compression Check
└── Send zlib-compressed message, check if server accepts
4. Assessment
└── Compare version + zlib status against vulnerability database
When exact version unavailable (auth required), scanner estimates from maxWireVersion:
| Wire Version | MongoDB Branch |
|---|---|
| 25 | 8.0.x |
| 27 | 8.2.x |
| 21 | 7.0.x |
| 17 | 6.0.x |
| 13 | 5.0.x |
VULNERABLE = (version in vulnerable range) AND (zlib enabled)
MITIGATED = (version in vulnerable range) AND (zlib disabled)
SAFE = (version >= fixed version)
# mongod.conf
net:
compression:
compressors: snappy,zstd # Remove 'zlib'
Or via command line:
mongod --networkMessageCompressors snappy,zstd
THIS TOOL IS PROVIDED FOR AUTHORIZED SECURITY TESTING ONLY.
You must obtain proper authorization before scanning any systems
you do not own or have explicit written permission to test.
Unauthorized access to computer systems is illegal.
The authors assume no liability for misuse of this tool.
| Code | Meaning |
|---|---|
| 0 | All targets safe or mitigated |
| 1 | Connection errors occurred |
| 2 | Vulnerable targets found |
Useful for scripting:
python scanner.py -t mongodb.example.com
if [ $? -eq 2 ]; then
echo "ALERT: Vulnerable MongoDB detected!"
fi
For authorized security testing and research purposes only.
| Branch | Vulnerable Versions | Fixed Version |
|---|
| 8.2.x | 8.2.0 - 8.2.2 | 8.2.3 |
| 8.0.x | 8.0.0 - 8.0.16 | 8.0.17 |
| 7.0.x | 7.0.0 - 7.0.27 | 7.0.28 |
| 6.0.x | 6.0.0 - 6.0.26 | 6.0.27 |
| 5.0.x | 5.0.0 - 5.0.31 | 5.0.32 |
| 4.4.x | 4.4.0 - 4.4.29 | 4.4.30 |
| ≤4.2 | All versions | EOL - No patch |
| Option | Description |
|---|
-t, --targets | Comma-separated targets (host or host:port) |
-f, --file | File with targets (one per line) |
-o, --output | Export file (.txt, .json, .csv) |
-q, --quiet | Show summary only |
-v, --version | Show version |
-h, --help | Show help |
| Symbol | Status | Description |
|---|
[!] | VULNERABLE | Confirmed vulnerable, immediate action required |
[?!] | POSSIBLY VULNERABLE | Version estimated, needs manual verification |
[+] | SAFE | Patched version |
[~] | MITIGATED | Vulnerable version but zlib disabled |
[?] | UNKNOWN | Could not determine status |
[-] | UNREACHABLE | Connection failed |
| Current Version | Update To |
|---|
| 8.2.0 - 8.2.2 | 8.2.3+ |
| 8.0.0 - 8.0.16 | 8.0.17+ |
| 7.0.0 - 7.0.27 | 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+ |