What’s Vulnerable › Vulnerabilities
CVE-2018-20803: Infinite loop in aggregation expression
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2020-11-23 · updated 2026-06-17
- Weakness: CWE-835
Description
A user authorized to perform database queries may trigger denial of service by issuing specially crafted queries, which loop indefinitely in mathematics processing while retaining locks. This issue affects MongoDB Server v4.0 versions prior to 4.0.5; MongoDB Server v3.6 versions prior to 3.6.10 and MongoDB Server v3.4 versions prior to 3.4.19.
Affected products
- MongoDB: from 3.4.0 before 3.4.19; from 3.6.0 before 3.6.10; from 4.0.0 before 4.0.5 — fixed in 3.4.19, 3.6.10, 4.0.5
How to fix
Upgrade to a fixed version: MongoDB 3.4.19, 3.6.10, 4.0.5. Check the vendor advisory for mitigations.
References
Get alerted when CVE-2018-20803 or the next vulnerability affects your stack