What’s Vulnerable › Vulnerabilities
CVE-2021-20333: Server log entry spoofing via newline injection
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.3% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-07-23 · updated 2026-06-17
- Weakness: CWE-117
Description
Sending specially crafted commands to a MongoDB Server may result in artificial log entries being generated or for log entries to be split. This issue affects MongoDB Server v3.6 versions prior to 3.6.20; MongoDB Server v4.0 versions prior to 4.0.21 and MongoDB Server v4.2 versions prior to 4.2.10.
Affected products
- MongoDB: from 3.6.0 before 3.6.20; from 4.0.0 before 4.0.21; from 4.2.0 before 4.2.10 — fixed in 3.6.20, 4.0.21, 4.2.10
How to fix
Upgrade to a fixed version: MongoDB 3.6.20, 4.0.21, 4.2.10. Check the vendor advisory for mitigations.
References
Get alerted when CVE-2021-20333 or the next vulnerability affects your stack