CVE DatabaseCVE-2025-14847
한국어 권고문 →
CVE-2025-148477.5/HIGHCISA KEVCWE-130

MongoDB Server Pre-Auth Heap Memory Disclosure via Zlib Compressed Protocol Header Length Mismatch (CVE-2025-14847)

⚡ Jump to Patch
Affected Vendors
mongodb
Affected Components
mongodb_server
Published Date
2025-12-19
CVSS v3.1
7.5
HIGH
EPSS (30d)
83.2%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

All MongoDB Server versions v3.6+, v4.0+, v4.2+, and versions prior to v4.4.30, v5.0.32, v6.0.27, v7.0.28, v8.0.17, and v8.2.3

Impact

An unauthenticated remote attacker can read uninitialized heap memory by sending crafted Zlib compressed protocol headers, potentially exposing highly sensitive system and session data

Mitigation

Immediately upgrade MongoDB Server to the respective patched release versions (v4.4.30, v5.0.32, v6.0.27, v7.0.28, v8.0.17, v8.2.3, or later)

Affected Products & Version Scope

MongoDB Server versions v3.6.0 and newer, v4.0.0 and newer, v4.2.0 and newer, and prior to v4.4.30, v5.0.32, v6.0.27, v7.0.28, v8.0.17, and v8.2.3

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Update your MongoDB Server packages to the latest secure releases using your operating system's package manager.

bash
# For Ubuntu/Debian-based systems
sudo apt-get update
sudo apt-get --only-upgrade install -y mongodb-org mongodb-org-server

# For RHEL/CentOS/Rocky Linux-based systems
sudo yum clean all
sudo yum update -y mongodb-org-server

2. Temporary Workaround & Hardening Configuration

If immediate patching is not feasible, restrict network binding in the MongoDB configuration file (/etc/mongod.conf) and enforce strict firewall rules to block untrusted traffic.

bash
# 1. Restrict bindIp in /etc/mongod.conf to localhost or trusted internal IPs only
# Edit the net section as follows:
# net:
#   port: 27017
#   bindIp: 127.0.0.1,10.0.0.5

# 2. Restrict access to port 27017 using UFW firewall
sudo ufw deny 27017/tcp
sudo ufw allow from 10.0.0.0/24 to any port 27017 proto tcp
sudo ufw reload

3. Log Audit & IoC Verification Commands

Verify the running MongoDB version and inspect the logs for anomalous connection terminations or protocol errors.

bash
# 1. Check the currently running MongoDB version
mongod --version | grep 'db version'

# 2. Scan MongoDB logs for abnormal connection drops or protocol anomalies
# (Adjust the log path according to your environment configuration)
sudo grep -Ei 'connection.*ended|protocol.*error|invalid.*length' /var/log/mongodb/mongod.log | tail -n 50
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
As this vulnerability is listed in the CISA KEV, immediately restrict network access to your MongoDB instances and upgrade to a patched version.

Block Exploits Instantly with Managed Virtual Patching Rules

Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2025-14847, publicly referred to as 'MongoBleed') exists in the network communication protocol handling of MongoDB Server. MongoDB supports the OP_COMPRESSED message structure to optimize data transmission between clients and the server, utilizing compression algorithms such as Zlib. The root cause of this flaw is a length field validation mismatch (CWE-130) within the Zlib compressed protocol headers. When there is a discrepancy between the actual decompressed data size and the length specified in the header, the server fails to validate this mismatch, allocating and copying memory in a way that exposes uninitialized heap memory back to the client.

2. Exploitation Mechanics & Attack Scenario

An unauthenticated remote attacker can establish a direct TCP connection to the MongoDB service port (default: 27017) and transmit a specially crafted OP_COMPRESSED packet. This packet contains a manipulated header where the declared decompressed length is significantly larger than the actual compressed payload. Upon receiving this request, the MongoDB server allocates a heap buffer corresponding to the spoofed decompressed length. Because the actual decompressed data does not fill the allocated buffer, the remaining space retains residual data previously stored in that heap memory segment. The server then transmits this entire buffer back to the client, allowing the attacker to read raw heap memory contents without authentication.

3. Infrastructure & Business Impact

This vulnerability has been assigned a CVSS score of 7.5 (High) and is actively cataloged in the CISA KEV (Known Exploited Vulnerabilities) list, indicating active exploitation in the wild. Successful exploitation allows attackers to extract highly sensitive business and infrastructure data residing in the heap memory, including database credentials, active session tokens, internal query structures, and cached database records. Since this occurs during the pre-authentication phase, any MongoDB instance exposed to the public internet is at extreme risk of data exfiltration.

Official Vendor Advisories & References

NVD Original English Description

Mismatched length fields in Zlib compressed protocol headers may allow a read of uninitialized heap memory by an unauthenticated client. This issue affects all MongoDB Server v7.0 prior to 7.0.28 versions, MongoDB Server v8.0 versions prior to 8.0.17, MongoDB Server v8.2 versions prior to 8.2.3, MongoDB Server v6.0 versions prior to 6.0.27, MongoDB Server v5.0 versions prior to 5.0.32, MongoDB Server v4.4 versions prior to 4.4.30, MongoDB Server v4.2 versions greater than or equal to 4.2.0, MongoDB Server v4.0 versions greater than or equal to 4.0.0, and MongoDB Server v3.6 versions greater than or equal to 3.6.0.

Frequently Asked SecOps Questions (CVE-2025-14847)

FAQ

Q1. How critical is CVE-2025-14847 and is it actively exploited in the wild?

CVE-2025-14847 is rated CVSS 7.5 (HIGH) with a 30-day EPSS exploitation probability of 83.2%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2025-14847?

Primary impacted vendors include mongodb across mongodb_server. Scope summary: MongoDB Server versions v3.6.0 and newer, v4.0.0 and newer, v4.2.0 and newer, and prior to v4.4.30, v5.0.32, v6.0.27, v7.0.28, v8.0.17, and v8.2.3

Q3. What temporary mitigations or workarounds exist for CVE-2025-14847 before patching?

[Mitigation] Immediately upgrade MongoDB Server to the respective patched release versions (v4.4.30, v5.0.32, v6.0.27, v7.0.28, v8.0.17, v8.2.3, or later) Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2025-14847

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (mongodb)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2025-14847 MongoDB Server Pre-Auth Heap Memory Disclosure via Zlib Compressed Protocol Header Length Mismatch (CVE-2025-14847) (CVSS 7.5) - Patch & Workaround | CVE Pulse