CVE-2021-32040
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
12/04/2022
Last modified:
16/09/2024
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.<br />
<br />
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.
Impact
Base Score 3.x
7.50
Severity 3.x
HIGH
Base Score 2.0
5.00
Severity 2.0
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:* | 4.2.0 (including) | 4.2.16 (excluding) |
| cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:* | 4.4.0 (including) | 4.4.11 (excluding) |
| cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:* | 5.0.0 (including) | 5.0.4 (excluding) |
To consult the complete list of CPE names with products and versions, see this page



