Detect MongoDB Improper Handling of Length Parameter Inconsistency (CVE-2025-14847) in Google Chronicle
Detects exploitation attempts targeting CVE-2025-14847, an improper handling of length parameter inconsistency vulnerability (CWE-130) in MongoDB and MongoDB Server. This vulnerability is listed in CISA's Known Exploited Vulnerabilities catalog, indicating active exploitation in the wild. Attackers may craft malformed requests with inconsistent length parameters to cause unexpected server behavior, potentially leading to denial of service, data corruption, or unauthorized access.
MITRE ATT&CK
- Tactic
- Initial Access Impact
YARA-L Detection Query
rule cve_2025_14847_mongodb_length_param_inconsistency {
meta:
author = "df00tech"
description = "Detects CVE-2025-14847 MongoDB length parameter inconsistency exploitation"
severity = "HIGH"
priority = "HIGH"
reference = "https://jira.mongodb.org/browse/SERVER-115508"
yara_version = "YL2.0"
rule_version = "1.0"
events:
(
$log.metadata.product_name = /(?i)mongodb/ or
$log.principal.process.file.full_path = /(?i)(mongod|mongos)/
)
and
(
$log.metadata.description = /(?i)(length.*inconsisten|bson.*invalid|assertion.*failed|malformed|param.*mismatch)/ or
$log.security_result.description = /(?i)(length.*inconsisten|bson.*invalid|assertion.*failed)/
)
condition:
$log
} Chronicle YARA-L rule detecting MongoDB events matching CVE-2025-14847 length parameter inconsistency exploitation patterns across Google Security Operations ingested logs.
Data Sources
Required Tables
False Positives & Tuning
- MongoDB internal diagnostic events during scheduled maintenance or patching
- Replica set failover events generating transient assertion and error messages
- MongoDB Atlas managed service health checks that surface as product log events
- Custom ETL pipelines connecting to MongoDB that produce non-standard length field values
Other platforms for CVE-2025-14847
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Send Malformed BSON Message with Inconsistent Length to MongoDB
Expected signal: MongoDB diagnostic log should record a parse error, assertion failure, or connection reset. Network capture should show malformed wire protocol frame followed by TCP RST or server-side close.
- Test 2Fuzzing MongoDB Port with Length Boundary Payloads
Expected signal: Multiple connection events on port 27017 in rapid succession, followed by MongoDB log entries for parser errors or assertion failures for each boundary value tested.
- Test 3Verify MongoDB Version and Patch Status
Expected signal: MongoDB audit log (if enabled) records a connection and command execution from localhost. Authentication log shows anonymous or credential-less connection attempt.
Unlock Pro Content
Get the full detection package for CVE-2025-14847 including response playbook, investigation guide, and atomic red team tests.