7.5
HIGH
CVE-2021-32040
MongoDB Server Stack Based DoS Vulnerability
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.

INFO

Published Date :

April 12, 2022, 3:15 p.m.

Last Modified :

Sept. 16, 2024, 8:15 p.m.

Remotely Exploitable :

Yes !

Impact Score :

3.6

Exploitability Score :

3.9
Affected Products

The following products are affected by CVE-2021-32040 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Mongodb mongodb
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2021-32040.

URL Resource
https://jira.mongodb.org/browse/SERVER-58203 Issue Tracking Patch Vendor Advisory
https://jira.mongodb.org/browse/SERVER-59299 Issue Tracking Patch Vendor Advisory
https://jira.mongodb.org/browse/SERVER-60218 Issue Tracking Patch Vendor Advisory
https://security.netapp.com/advisory/ntap-20220609-0005/ Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-32040 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-32040 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    Sep. 16, 2024

    Action Type Old Value New Value
    Changed 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. 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.
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Feb. 23, 2024

    Action Type Old Value New Value
    Changed 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 versions prior to 5.0.4, 4.4.11, 4.2.16. 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.
  • Modified Analysis by [email protected]

    Feb. 03, 2023

    Action Type Old Value New Value
    Changed Reference Type https://security.netapp.com/advisory/ntap-20220609-0005/ No Types Assigned https://security.netapp.com/advisory/ntap-20220609-0005/ Third Party Advisory
  • CVE Modified by [email protected]

    Jun. 09, 2022

    Action Type Old Value New Value
    Added Reference https://security.netapp.com/advisory/ntap-20220609-0005/ [No Types Assigned]
  • Initial Analysis by [email protected]

    Apr. 20, 2022

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:N/C:N/I:N/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
    Changed Reference Type https://jira.mongodb.org/browse/SERVER-58203 No Types Assigned https://jira.mongodb.org/browse/SERVER-58203 Issue Tracking, Patch, Vendor Advisory
    Changed Reference Type https://jira.mongodb.org/browse/SERVER-59299 No Types Assigned https://jira.mongodb.org/browse/SERVER-59299 Issue Tracking, Patch, Vendor Advisory
    Changed Reference Type https://jira.mongodb.org/browse/SERVER-60218 No Types Assigned https://jira.mongodb.org/browse/SERVER-60218 Issue Tracking, Patch, Vendor Advisory
    Added CWE NIST CWE-787
    Added CPE Configuration OR *cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:* versions from (including) 4.2.0 up to (excluding) 4.2.16 *cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:* versions from (including) 4.4.0 up to (excluding) 4.4.11 *cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:* versions from (including) 5.0.0 up to (excluding) 5.0.4
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-32040 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-32040 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.32 }} 0.15%

score

0.70654

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability