Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2021-32040

6.5 · MEDIUM
Published Apr 12, 2022 mongodb CWE-121 EPSS 2.05% (80th pctl)

Overview

CVE-2021-32040 is a medium-severity vulnerability affecting mongodb mongodb. It was published on April 12, 2022 and has a CVSS 3.1 base score of 6.5 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 6.5, rated MEDIUM. It can be exploited remotely over the network. Some level of privileges is required for exploitation.

Technical 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.

Remediation

Check the references section for vendor advisories and patches from mongodb. Update mongodb to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status
mongodb mongodb >= 4.2.0, < 4.2.16 Affected

Frequently Asked Questions

What is CVE-2021-32040?

CVE-2021-32040 is a medium-severity vulnerability affecting mongodb mongodb. It was published on April 12, 2022 and has a CVSS 3.1 base score of 6.5 (MEDIUM).

How severe is CVE-2021-32040?

This vulnerability has a CVSS 3.1 base score of 6.5, rated MEDIUM. It can be exploited remotely over the network. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2021-32040?

Check the references section for vendor advisories and patches from mongodb. Update mongodb to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2021-32040?

CyberStrike's AI-powered security agents can automatically detect CVE-2021-32040 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.