Service crash via oversized $unionWith pipeline
Published Apr 12, 2022 · Updated Sep 16, 2024
Stack overflow in MongoDB Server 4.2 before 4.2.16, 4.4 through 4.4.28, and 5.0 before 5.0.4 allows remote authenticated users to crash mongod. UnionWithStage::doGetNext uses stack frames large enough that a pipeline near the default 1,000-stage limit exhausts the process stack. The user must be able to submit aggregation queries; exploitation interrupts the database process without reported data disclosure or modification.
Summary
What happened
Stack overflow in MongoDB Server 4.2 before 4.2.16, 4.4 through 4.4.28, and 5.0 before 5.0.4 allows remote authenticated users to crash mongod. UnionWithStage::doGetNext uses stack frames large enough that a pipeline near the default 1,000-stage limit exhausts the process stack. The user must be able to submit aggregation queries; exploitation interrupts the database process without reported data disclosure or modification.
The record
- CVE
- CVE-2021-32040
- Published
- Apr 12, 2022
- Updated
- Sep 16, 2024
- Vendor
- MongoDB
- Product
- MongoDB Server
- Classifications
- CWE-787, CWE-121, T1499
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Apr 12, 2022CVE publishedPublication date reported by the CVE source.
- Sep 16, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=4.2 <4.2.16
- Affected versionversion=4.4 <=4.4.28
- Affected versionversion=5.0 <5.0.4
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo