CVE-2021-32040
MEDIUMEPSS 78th pctlDescription
It may be possible to have an extremely long aggregation pipeline in conjunction with a specific stage/operator and cause a stack overflow due to the size of the stack frames used by that stage. If an attacker could cause such an aggregation to occur, they could maliciously crash MongoDB in a DoS attack. This vulnerability affects MongoDB Server v4.4 versions prior to and including 4.4.28, MongoDB Server v5.0 versions prior to 5.0.4 and MongoDB Server v4.2 versions prior to 4.2.16. Workaround: >= v4.2.16 users and all v4.4 users can add the --setParameter internalPipelineLengthLimit=50 instead of the default 1000 to mongod at startup to prevent a crash.
How to fix
Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.
CVSS v3 Vector
Exploitability
Impact
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Exploit Intelligence
Elevated risk: more likely to be exploited than 78% of all known CVEs.
References
Related Vulnerabilities
Other CWE-121 (Stack-based Buffer Overflow) vulnerabilities, ordered by exploit likelihood. View all
| CVE | Severity | CVSS | EPSS | Exploited | Fix |
|---|---|---|---|---|---|
| CVE-2025-22457 | Critical | 9.0 | 100% | KEV + Ransom | Fix |
| CVE-2025-0282 | Critical | 9.0 | 100% | KEV + Ransom | - |
| CVE-2021-20038 | Critical | 9.8 | 100% | KEV + Ransom | - |
| CVE-2009-0927 | High | 8.8 | 97% | KEV | Fix |
| CVE-2020-10924 | High | 8.8 | 87% | - | - |
| CVE-2022-20705 | Critical | 10.0 | 80% | - | - |
Embed a live status badge for CVE-2021-32040
Markdown
[](https://tridentstack.com/cve/CVE-2021-32040)HTML
<a href="https://tridentstack.com/cve/CVE-2021-32040"><img src="https://tridentstack.com/cve/badge/CVE-2021-32040.svg" alt="CVE-2021-32040"></a>Find and fix vulnerabilities across your fleet
TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.
Start freeThis product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2024-11-21.