Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
mongobleed — CVE-2025-14847 explaination and lab | Kitploit
Tools/GitHubGitHub/adolfbharath/mongobleed
Vulnerability AnalysisNetwork SecurityCryptographyLearning & EducationDatabase SecurityLabs & Practice
GitHubadolfbharath/mongobleed

mongobleed

CVE-2025-14847 explaination and lab

View Repository
14010 months agoNot yet reviewed
Share

MongoDB Compression Leak Lab (Safe, Educational)

Reference CVE : CVE-2025-14847

This repository is an educational lab that demonstrates the concept behind a class of issues often described as “compression framing / size-metadata memory disclosure” in database wire protocols.

It is written to support defensive understanding: how MongoDB network compression is negotiated and framed, why size fields matter, and how robust parsers prevent unintended memory exposure.

Note on CVE reference: This lab is framed around the idea referenced as CVE-2025-14847 . This repo does not validate, reproduce, or exploit a specific vendor bug or claim that any particular MongoDB version is affected. It focuses on the general failure mode (mismatched size metadata around compressed payloads) and the mitigations.

Version status (vulnerable vs patched)

This repository does not include (and should not be used as) evidence of which MongoDB versions are vulnerable or patched for any specific CVE.

To document “vulnerable” vs “patched” versions correctly for a report, use an official vendor advisory / release notes for the CVE and cite it.

Practical steps to verify what you are running:

  • Docker container version:
    • docker compose exec mongodb mongod --version
    • or docker compose exec mongodb mongosh --quiet --eval "db.version()"
  • Host installation version:
    • mongod --version
    • mongosh --quiet --eval "db.version()"

If you share the advisory link you’re using, I can format a clean “Affected / Fixed” table in the README without guessing.

What the vulnerability is (conceptually)

This lab illustrates a compression framing / size-metadata mismatch failure mode:

  • MongoDB messages are length-prefixed. With network compression, an OP_COMPRESSED envelope adds more size fields (outer message length, declared uncompressed size, and the inner message’s own length).
  • If an implementation trusts any of these size fields without strict validation, it can mis-handle buffers during decompression or parsing.
  • In buggy implementations, that can lead to out-of-bounds reads or returning uninitialized buffer bytes, which is one way “memory disclosure” can occur.

See protocol_overview.md for the detailed framing walkthrough.

Ethical disclaimer

  • This project is non-exploitable by design.
  • It does not include weaponized logic, exploit code, or techniques intended to compromise systems.
  • It should only be run against the local Docker container provided here.
  • Do not point this code at systems you do not own or lack explicit permission to test.

Learning objectives

By the end of the lab, you should be able to:

  • Explain how MongoDB’s wire protocol framing works at a high level.
  • Describe how zlib network compression is negotiated and applied.
  • Understand how malformed length / size metadata could conceptually lead to memory exposure in a buggy implementation.
  • Identify practical mitigations: patching, configuration hardening, and network detection.

What this repo does (and does not do)

It does:

  • Start MongoDB in Docker with zlib compression enabled.
  • Use a tiny, original Python client to:
    • Send an uncompressed hello including compression: ["zlib"]
    • Send a correctly framed OP_COMPRESSED message using zlib
    • Log uncompressed vs compressed sizes and a summary of server responses
  • Include a local “toy parser” demonstration that shows how a defensive parser rejects mismatched size metadata.

It does NOT:

  • Craft malicious packets for real-world exploitation.
  • Attempt authentication bypass.
  • Attempt to read arbitrary memory.

Repository contents

  • docker-compose.yml – Runs a MongoDB container with zlib compression enabled and localhost-only exposure.
  • protocol_overview.md – Wire protocol + BSON + compression workflow + conceptual vulnerability explanation.
  • mitigation.md – Defense guidance: patching, config, and detection ideas.
  • lab_probe.py – Original probe that negotiates compression and logs message sizes safely.

How to run the lab safely

1) Prerequisites

  • Docker Desktop (or compatible Docker engine)
  • Python 3.10+ (recommended)

2) Start MongoDB

From this repo directory:

docker compose up -d

Confirm it’s running:

docker compose ps

3) Run the probe

python .\lab_probe.py

Expected output:

  • Prints negotiated compressors from the first hello
  • Prints request/response sizes
  • Sends a compressed hello and logs both compressed and decompressed message sizes

4) Run the toy demo (no network)

python .\lab_probe.py --toy-demo

This runs only local parsing checks to illustrate why size validation matters.

5) Shut down

docker compose down

Safety notes

  • The container is bound to 127.0.0.1:27017 on the host.
  • No exploit behavior is present.
  • The probe enforces conservative limits (e.g., maximum message size) and validates all length fields.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    837
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    536
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    424
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    355
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    294
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    276

Explore all tools

Browse our collection of tools

View all tools →