Vulnerability from bitnami_vulndb
Published
2024-03-06 10:57
Modified
2025-05-20 10:02
Summary
Large aggregation pipelines with a specific stage can crash mongod under default configuration
Details

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.


{
  "affected": [
    {
      "package": {
        "ecosystem": "Bitnami",
        "name": "mongodb",
        "purl": "pkg:bitnami/mongodb"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.2.0"
            },
            {
              "fixed": "4.2.16"
            },
            {
              "introduced": "4.4.0"
            },
            {
              "fixed": "4.4.11"
            },
            {
              "introduced": "5.0.0"
            },
            {
              "fixed": "5.0.4"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "type": "CVSS_V3"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-32040"
  ],
  "database_specific": {
    "cpes": [
      "cpe:2.3:a:mongodb:mongodb:*:*:*:*:*:*:*:*"
    ],
    "severity": "High"
  },
  "details": "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:\u00a0\u003e= 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.",
  "id": "BIT-mongodb-2021-32040",
  "modified": "2025-05-20T10:02:07.006Z",
  "published": "2024-03-06T10:57:09.971Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://jira.mongodb.org/browse/SERVER-58203"
    },
    {
      "type": "WEB",
      "url": "https://jira.mongodb.org/browse/SERVER-59299"
    },
    {
      "type": "WEB",
      "url": "https://jira.mongodb.org/browse/SERVER-60218"
    },
    {
      "type": "WEB",
      "url": "https://security.netapp.com/advisory/ntap-20220609-0005/"
    },
    {
      "type": "WEB",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-32040"
    }
  ],
  "schema_version": "1.5.0",
  "summary": "Large aggregation pipelines with a specific stage can crash mongod under default configuration"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…