Someone left the database's diary open on the front porch, and anyone walking by can read it without knocking
CVE-2025-14847, branded MongoBleed, is an unauthenticated memory disclosure vulnerability in MongoDB Server's zlib network message compression. A crafted OP_COMPRESSED message claiming a larger uncompressedSize than the actual payload causes MongoDB to allocate an oversized buffer, decompress the small real payload into the start, then return the *entire* buffer — including uninitialized heap contents — back to the client. No authentication, no valid query, no user interaction required. Affected versions span the entire supported tree: 3.6.x, 4.0.x, 4.2.x, 4.4.x < 4.4.30, 5.0.x < 5.0.32, 6.0.x < 6.0.27, 7.0.x < 7.0.28, 8.0.x < 8.0.17, and 8.2.x < 8.2.3. Any MongoDB instance with zlib compression enabled (the default in wire protocol negotiation) is reachable.
MongoDB and Tenable rate this HIGH (CVSS v3 7.5, v4 8.7). That undersells the operational reality. The leaked heap memory routinely contains plaintext credentials, session tokens, SCRAM authentication material, and internal connection strings — artifacts that convert a read-only info-leak into full database compromise and lateral movement. Combined with CISA KEV listing, active in-the-wild exploitation, a trivially weaponized PoC (generated in 10 minutes with an AI coding assistant), 87K–213K internet-exposed instances, and MongoDB's canonical role as a *production data-tier component*, the vendor's HIGH is too low. This is a CRITICAL-class event.
5 steps from start to impact.
Identify exposed MongoDB
- MongoDB listening on a network-reachable interface
- Well-configured deployments bind to localhost or VPC-only interfaces
- Network firewalls / security groups should block 27017 from the internet
Send crafted OP_COMPRESSED message
mongobleed PoC (joe-desimone/mongobleed on GitHub) to send a zlib-compressed OP_MSG where the uncompressedSize header field is inflated far beyond the actual compressed payload. MongoDB allocates a buffer sized to the claimed value, decompresses the tiny real payload into the beginning, then treats the entire buffer as the response. No authentication handshake is needed — the exploit fires during the compression negotiation phase itself.- Network connectivity to MongoDB port
- Zlib compression enabled (default)
- If
--networkMessageCompressorsis explicitly set to exclude zlib, the attack surface is removed - mTLS or x.509 transport auth could block the connection before compression negotiation
Harvest leaked heap memory
- Successful step 2
- ASLR and heap randomization make targeted extraction nondeterministic, but bulk collection compensates
- Encrypted-at-rest does not protect in-memory plaintext
Authenticate with stolen credentials
- Valid credentials recovered from heap
- Network access to target MongoDB or replica set
- If credentials are rotated frequently the window narrows
- Network segmentation between app tier and DB tier may limit lateral movement
Lateral movement and data exfiltration
- Credential reuse across services
- Insufficient network segmentation
- Zero-trust / microsegmentation limits blast radius
- Unique per-service credentials limit pivot scope
The supporting signals.
| In-the-Wild Status | Actively exploited. CISA added to KEV catalog 2025-12-29. Mass scanning and credential theft campaigns observed per BleepingComputer, Vectra, Unit 42. |
|---|---|
| PoC Availability | Public and trivial. joe-desimone/mongobleed on GitHub. Generated in ~10 minutes using AI-assisted coding. Multiple forks and scanner integrations exist. |
| EPSS Score | 83.22% (100th percentile) — among the highest-probability exploitation scores in the current catalog. |
| KEV Status | Added 2025-12-29; federal remediation deadline 2026-01-19. BOD 22-01 applies. |
| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N (7.5). CVSS v4.0: 8.7. Network-reachable, zero-click, pre-auth, confidentiality-only impact per vector — but leaked secrets enable integrity/availability attacks downstream. |
| Affected Versions | MongoDB 3.6.x (EOL), 4.0.x (EOL), 4.2.x (EOL), 4.4.x < 4.4.30, 5.0.x < 5.0.32, 6.0.x < 6.0.27, 7.0.x < 7.0.28, 8.0.x < 8.0.17, 8.2.x < 8.2.3 |
| Fixed Versions | 4.4.30, 5.0.32, 6.0.27, 7.0.28, 8.0.17, 8.2.3 |
| Exposure Data | Shodan: 213K+ internet-facing MongoDB instances. Censys: 87K+. BleepingComputer reports 87K directly exploitable. These counts include unpatched and zlib-enabled servers. |
| Disclosure Date | 2025-12-19 (initial advisory); PoC published 2025-12-25; KEV listed 2025-12-29. |
| Researcher / Org | Discovered by MongoDB engineering. Public PoC by Joe Desimone (Elastic Security). Detection guidance by Eric Capuano, Vectra AI, Unit 42. |
noisgate verdict.
The single most decisive factor is the role multiplier: MongoDB is canonically a production database engine — the majority of its installed base occupies a high-value data-tier role where leaked heap memory contains credentials and regulated data, and the unauthenticated, zero-click, network-remote exploit path has no friction gates that narrow the reachable population below the CRITICAL floor. Active KEV listing with mass exploitation campaigns and a trivially weaponized PoC eliminate any residual argument for deferral.
Why this verdict
- Pre-auth, zero-click, network-remote: CVSS vector AV:N/AC:L/PR:N/UI:N means every network-reachable instance is exploitable with no preconditions. No friction gate narrows this.
- Role multiplier: MongoDB is a production database engine by definition. ≥80% of installs serve application data tiers holding credentials, PII, or business-critical data. A heap leak from this role exposes secrets that cascade to full-environment compromise (host → database → lateral → fleet). This floors the verdict at CRITICAL.
- KEV-listed with mass exploitation: CISA KEV entry 2025-12-29, EPSS 83.22% (100th percentile), and confirmed credential-theft campaigns mean this is not theoretical — it is being exploited at scale *right now*.
- Trivial weaponization: Public PoC generated in 10 minutes, multiple GitHub forks, scanner integrations. The skill bar is script-kiddie level.
- Massive exposure surface: 87K–213K internet-facing instances per Shodan/Censys. Even internally-facing MongoDB instances are reachable post-initial-access, and the leaked credentials enable pivot.
Why not higher?
A 9.1 is already near the ceiling. It is not a 10.0 because the *direct* impact is confidentiality-only (information disclosure, not immediate code execution), and heap contents are nondeterministic — an attacker may need multiple requests to recover usable credentials, adding a thin layer of probabilistic friction.
Why not lower?
Downgrading below CRITICAL is not defensible. The affected component *is* the database — it canonically occupies the high-value production data tier. The attack is unauthenticated and remote with zero user interaction. There are no prerequisite compromises. KEV listing and active mass exploitation confirm real-world impact. The CRITICAL floor applies and friction analysis finds no gate that meaningfully narrows the reachable population.
What to do — in priority order.
- Disable zlib compression immediately — Set
--networkMessageCompressors snappy,zstd(ornone) inmongod.confand restart. This removes the vulnerable code path entirely without upgrading. Deploy within the 3-day noisgate mitigation SLA for CRITICAL. - Block TCP/27017 from untrusted networks — Firewall rules or security groups must restrict MongoDB ports to known application-tier IPs only. No MongoDB instance should ever be internet-facing. Verify with
nmapor your attack surface management tool. - Enable MongoDB x.509 or mTLS transport authentication — Requiring mutual TLS at the transport layer prevents unauthenticated clients from reaching the compression negotiation phase. This is a defense-in-depth layer if zlib cannot be disabled.
- Rotate all MongoDB credentials — Assume credentials stored in heap memory have been leaked if any instance was exposed. Rotate SCRAM passwords, connection strings, and any shared secrets. Audit for credential reuse across services.
- Deploy IDS/IPS signatures for MongoBleed — Vectra, Suricata community rules, and Snort signatures exist for anomalous OP_COMPRESSED size mismatches. Deploy to detect ongoing exploitation attempts while patching proceeds.
- Encryption at rest does not help — the vulnerability leaks *in-memory* plaintext, not on-disk ciphertext. TDE/FDE is irrelevant.
- MongoDB authentication alone does not help — the exploit fires *before* the authentication handshake, during compression negotiation. Requiring auth does not block the attack.
- Read-only user restrictions do not help — the memory leak is pre-auth and bypasses all RBAC controls entirely.
- WAF / reverse proxy in front of MongoDB is uncommon and unlikely to inspect MongoDB wire protocol; standard HTTP WAFs will not detect or block this.
Crowdsourced verification payload.
Run this on any host with network access to the target MongoDB instance. Requires mongosh (MongoDB Shell) or mongod --version on the target. Example: bash check_mongobleed.sh 10.0.1.50 27017. No special privileges needed for the version check.
#!/usr/bin/env bash
# check_mongobleed.sh — CVE-2025-14847 (MongoBleed) version checker
# Usage: bash check_mongobleed.sh <HOST> [PORT]
# Exit codes: 1=VULNERABLE, 0=PATCHED, 2=UNKNOWN
set -euo pipefail
HOST="${1:?Usage: $0 <HOST> [PORT]}"
PORT="${2:-27017}"
# Fixed versions per branch
declare -A FIXED=(
[4.4]=4.4.30
[5.0]=5.0.32
[6.0]=6.0.27
[7.0]=7.0.28
[8.0]=8.0.17
[8.2]=8.2.3
)
# EOL branches with no fix available
EOL_BRANCHES="3.6 4.0 4.2"
echo "[*] Connecting to ${HOST}:${PORT}..."
VERSION=$(mongosh --host "$HOST" --port "$PORT" --quiet --eval 'db.version()' 2>/dev/null || true)
if [[ -z "$VERSION" ]]; then
echo "[!] Could not retrieve MongoDB version from ${HOST}:${PORT}"
echo "UNKNOWN"
exit 2
fi
echo "[*] Detected MongoDB version: ${VERSION}"
MAJOR_MINOR=$(echo "$VERSION" | grep -oP '^[0-9]+\.[0-9]+')
# Check EOL branches
for eol in $EOL_BRANCHES; do
if [[ "$MAJOR_MINOR" == "$eol" ]]; then
echo "[!] MongoDB ${VERSION} is EOL branch ${eol} — no patch available."
echo "VULNERABLE"
exit 1
fi
done
# Check supported branches
if [[ -n "${FIXED[$MAJOR_MINOR]+x}" ]]; then
FIXED_VER="${FIXED[$MAJOR_MINOR]}"
# Compare versions using sort -V
LOWEST=$(printf '%s\n%s' "$VERSION" "$FIXED_VER" | sort -V | head -n1)
if [[ "$LOWEST" == "$FIXED_VER" ]] || [[ "$VERSION" == "$FIXED_VER" ]]; then
echo "[+] MongoDB ${VERSION} >= ${FIXED_VER} — patched."
echo "PATCHED"
exit 0
else
echo "[!] MongoDB ${VERSION} < ${FIXED_VER} — vulnerable to CVE-2025-14847."
echo "VULNERABLE"
exit 1
fi
else
echo "[?] MongoDB ${VERSION} (branch ${MAJOR_MINOR}) not in known affected range."
echo "UNKNOWN"
exit 2
fiIf you remember one thing.
--networkMessageCompressors snappy,zstd) on every MongoDB instance *today* as your emergency mitigation; this kills the attack path without an upgrade. Simultaneously, begin rolling upgrades to patched versions (4.4.30, 5.0.32, 6.0.27, 7.0.28, 8.0.17, or 8.2.3) targeting completion within the 3-day noisgate mitigation SLA for CRITICAL findings, with full remediation (patch applied, credentials rotated, exposure verified eliminated) within the 90-day noisgate remediation SLA. Any MongoDB on EOL branches (3.6, 4.0, 4.2) must be upgraded to a supported branch — there is no backport. Rotate all MongoDB credentials and shared connection strings; assume any previously-exposed instance has already leaked heap contents. Verify no instance is internet-facing via your attack surface management tool. This is a Monday-morning-drop-everything item.Sources
What defenders are saying.
Crowdsourced verification outputs.
Results submitted by users who ran the verification payload against their environment.