Bug 2074792 (CVE-2021-32040)

Summary: CVE-2021-32040 mongodb: Pipeline Stack-based Overflow
Product: [Other] Security Response Reporter: Avinash Hanwate <ahanwate>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bbuckingham, bcourt, bkearney, ehelms, jsherril, lzap, mhulan, nmoumoul, orabin, pcreech, rchan
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: MongoDB Server 4.2.16, MongoDB Server 4.4.11, MongoDB Server 5.0.4 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in MongoDB. This flaw allows an attacker to maliciously crash MongoDB in a denial of service attack if they can cause an extremely long aggregation pipeline in conjunction with a specific stage/operator, which leads to a stack overflow due to the size of the stack frames used by that stage.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2076227, 2076228    
Bug Blocks: 2074793    

Description Avinash Hanwate 2022-04-13 06:01:52 UTC
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.

https://jira.mongodb.org/browse/SERVER-58203
https://jira.mongodb.org/browse/SERVER-60218
https://jira.mongodb.org/browse/SERVER-59299