# CVE-2021-20333: Server log entry spoofing via newline injection

- Severity: Medium 5.3 (CVSS:3.1, scored by mongodb) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.30%, higher than 71% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-07-23T11:25:11.191Z
- Modified: 2026-09-08T08:48:14.054Z
- Also known as: BIT-MONGODB-2021-20333
- Weaknesses: CWE-116, CWE-117
- Assigned by: mongodb

## 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.

(As written by CVE List.)

## Affected

- MongoDB Inc. MongoDB Server: from 3.6 before 3.6.20; from 4.0 before 4.0.21; from 4.2 before 4.2.10
- mongodb 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
- mongodb (Bitnami): from 3.6.0 before 3.6.20; from 4.0.0 before 4.0.21; from 4.2.0 before 4.2.10

## Every score

- mongodb: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://jira.mongodb.org/browse/SERVER-50605> (exploit, advisory, patch, vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-20333> (web)

## Sources

- CVE List: [CVE-2021-20333](https://www.cve.org/CVERecord?id=CVE-2021-20333), CVE Terms of Use, modified 2024-09-17
- NVD: [CVE-2021-20333](https://nvd.nist.gov/vuln/detail/CVE-2021-20333), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-MONGODB-2021-20333](https://osv.dev/vulnerability/BIT-MONGODB-2021-20333), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-20333 · Whole record: https://cve.day/CVE-2021-20333.json · Rebuilt by cve.day 2026-11-25T22:58:02.847Z
