Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2021-32040

published medium CVSS 3.1 · 6.5

Large aggregation pipelines with a specific stage can crash mongod under default configuration

Published
12 Apr 2022, 14:15:16 UTC
Updated
16 Sep 2024, 20:03:21 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
MongoDB Inc. — MongoDB Server5.0 to < 5.0.4 · 4.4 through 4.4.28 · 4.2 to < 4.2.16 · Other versions: unaffected Affected Not stated mongodb
mongodb — mongodb5.0 to < 5.0.4 · 4.4 through 4.4.28 · 4.2 to < 4.2.16 · Other versions: unknown Affected Not stated CISA-ADP

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.

en · mongodb · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
6.5 / 10
Severity
medium
Provider
mongodb · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Scenarios
en: GENERAL

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
MongoDB Inc. MongoDB Server 5.0 to < 5.0.4 (affected · custom)4.4 through 4.4.28 (affected · custom)4.2 to < 4.2.16 (affected · custom)Default: unaffected mongodb · cna
mongodb mongodb 5.0 to < 5.0.4 (affected · custom)4.4 through 4.4.28 (affected · custom)4.2 to < 4.2.16 (affected · custom)Default: unknown CISA-ADP · adp

Weaknesses

1
  • CWE-121 CWE-121 Stack-based Buffer Overflow (mongodb · cna)

References

4

Provider assertions

3

mongodb · cna

Large aggregation pipelines with a specific stage can crash mongod under default configuration

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.1
Searchable
yes
Content hash
f6604268d698fb61ded6e09d14d48f0a8c136878d5069f9925ae21d3c1238c7f
Ingested
23 Sep 2026, 07:54:21 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected