CVE & CISA-KEV Catalog

CVE-2021-32040

MEDIUMEPSS 78th pctl
6.5
CVSS v3
NVD

Description

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 Available
MongoDBWindows application
Affected:4.4.0 4.4.11Fixed in:4.4.11MongoDB Inc.
Affected:5.0.0 5.0.4Fixed in:5.0.4MongoDB Inc.
Affected:4.2.0 4.2.16Fixed in:4.2.16MongoDB Inc.

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

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Exploit Intelligence

1.97%probability of exploitation in 30 days
78thpercentile

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

CVESeverityCVSSEPSSExploitedFix
CVE-2025-22457Critical9.0100%KEV + RansomFix
CVE-2025-0282Critical9.0100%KEV + Ransom-
CVE-2021-20038Critical9.8100%KEV + Ransom-
CVE-2009-0927High8.897%KEVFix
CVE-2020-10924High8.887%--
CVE-2022-20705Critical10.080%--
Embed a live status badge for CVE-2021-32040
CVE-2021-32040 severity badge

Markdown

[![CVE-2021-32040](https://tridentstack.com/cve/badge/CVE-2021-32040.svg)](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 free

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