{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2021-32040","published":"2022-04-12T15:15:07.707000Z","last_modified":"2026-06-17T03:52:43.110000Z","status":"Modified","cvss":{"version":"3.1","score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"nvd@nist.gov","primary":true},"auth":false,"cwes":["CWE-121","CWE-787"],"cpes":[{"criteria":"cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:*","part":"a","vendor":"mongodb","product":"mongodb","version_start_including":"4.2.0","version_end_excluding":"4.2.16"},{"criteria":"cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:*","part":"a","vendor":"mongodb","product":"mongodb","version_start_including":"4.4.0","version_end_excluding":"4.4.11"},{"criteria":"cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:*","part":"a","vendor":"mongodb","product":"mongodb","version_start_including":"5.0.0","version_end_excluding":"5.0.4"}],"cpes_truncated":false,"vendors":["mongodb"],"products":["mongodb/mongodb"],"ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial"},"epss":{"score":0.02011,"percentile":0.81541,"date":"2026-11-29","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[],"severity":"high","priority_score":60,"links":{"html_es":"/es/cve/CVE-2021-32040/","html_en":"/en/cve/CVE-2021-32040/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-32040","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-32040"},"untrusted":{"vendor_name":"Mongodb","product_name":"Mongodb","desc_en":"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.\n\nWorkaround: >= 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.","affected":[{"untrusted_vendor":"MongoDB Inc.","untrusted_product":"MongoDB Server","versions":[]},{"untrusted_vendor":"mongodb","untrusted_product":"mongodb","versions":[]}],"references":[{"url":"https://jira.mongodb.org/browse/SERVER-58203","tags":["Issue Tracking","Patch","Vendor Advisory"]},{"url":"https://jira.mongodb.org/browse/SERVER-59299","tags":["Issue Tracking","Patch","Vendor Advisory"]},{"url":"https://jira.mongodb.org/browse/SERVER-60218","tags":["Issue Tracking","Patch","Vendor Advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20220609-0005/","tags":["Third Party Advisory"]}]}}