{"id":"CVE-2021-32040","published":"2022-04-12T14:15:16Z","modified":"2024-09-16T20:03:21Z","title":"Large aggregation pipelines with a specific stage can crash mongod under default configuration","vendor":"MongoDB Inc.","product":"MongoDB Server","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02011,"percentile":0.81355,"provenance":"source"},"cwes":[{"id":"CWE-121","name":"Stack-based Buffer Overflow"}],"references":[{"url":"https://jira.mongodb.org/browse/SERVER-58203","tags":["x_refsource_MISC"]},{"url":"https://jira.mongodb.org/browse/SERVER-59299","tags":["x_refsource_MISC"]},{"url":"https://jira.mongodb.org/browse/SERVER-60218","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20220609-0005/","tags":["x_refsource_CONFIRM"]}],"priority":{"score":20.8,"factors":[{"name":"EPSS percentile","points":16.27},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"mongodb","affectedVersions":[{"vendor":"MongoDB Inc.","product":"MongoDB Server","versions":[">= 5.0, < 5.0.4",">= 4.4, <= 4.4.28",">= 4.2, < 4.2.16"]}],"workarounds":{"items":[">= 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."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-02-23T18:16:37.734248Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2021-18906","exploited":false,"provenance":"source"}}