Detect MongoDB Improper Handling of Length Parameter Inconsistency (CVE-2025-14847) in Elastic Security
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
Elastic Detection Query
sequence by host.name with maxspan=5m
[process where process.name in ("mongod", "mongos") and
event.type == "start"]
[any where
(data_stream.dataset : "mongodb.*" or log.logger : "mongod") and
(
message : "*length*inconsisten*" or
message : "*BSONObj*invalid*" or
message : "*assertion*failed*" or
message : "*malformed*request*" or
message : "*param*mismatch*"
)
] EQL sequence detection correlating MongoDB process activity with log events indicating length parameter inconsistency exploitation (CVE-2025-14847).
Data Sources
Required Tables
False Positives & Tuning
- MongoDB process restarts during patching or upgrades coinciding with transient error log entries
- Misconfigured MongoDB client drivers sending non-standard BSON messages triggering parser errors
- Automated health-check scripts that probe MongoDB and generate benign error responses
- High-cardinality write workloads causing transient BSON length validation warnings
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.