{
  "schemaVersion": 1,
  "attribution": [
    {
      "source": "CISA Known Exploited Vulnerabilities",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog",
      "licence": "US government work"
    },
    {
      "source": "GitHub Advisory Database",
      "url": "https://github.com/advisories",
      "licence": "CC BY 4.0"
    },
    {
      "source": "Have I Been Pwned",
      "url": "https://haveibeenpwned.com/",
      "licence": "CC BY 4.0"
    },
    {
      "source": "CVE Program (CVE records)",
      "url": "https://www.cve.org/Legal/TermsOfUse",
      "licence": "CVE Terms of Use",
      "notice": "Copyright © 1999-2026, The MITRE Corporation. CVE is a trademark and the CVE logo is a registered trademark of The MITRE Corporation.",
      "terms": "CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy."
    },
    {
      "source": "FIRST EPSS",
      "url": "https://www.first.org/epss/",
      "licence": "free to use; FIRST requests attribution"
    }
  ],
  "record": {
    "id": "CVE-2021-32040",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2021-32040",
    "idYear": 2021,
    "status": "PUBLISHED",
    "publishedAt": "2022-04-12T14:15:16.692Z",
    "updatedAt": "2024-09-16T20:03:21.667Z",
    "importedAt": "2026-10-24T01:56:32.228Z",
    "snapshot": {
      "id": "cve_2026-10-24_midnight_baseline",
      "at": "2026-10-24T00:00:00.000Z",
      "source": "https://github.com/CVEProject/cvelistV5/releases/tag/cve_2026-10-24_0100Z"
    },
    "facts": {
      "title": "Large aggregation pipelines with a specific stage can crash mongod under default configuration",
      "summary": "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.",
      "affected": [
        {
          "vendor": "MongoDB Inc.",
          "product": "MongoDB Server",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "5.0",
              "status": "affected",
              "versionType": "custom",
              "lessThan": "5.0.4"
            },
            {
              "version": "4.4",
              "status": "affected",
              "versionType": "custom",
              "lessThanOrEqual": "4.4.28"
            },
            {
              "version": "4.2",
              "status": "affected",
              "versionType": "custom",
              "lessThan": "4.2.16"
            }
          ]
        }
      ]
    }
  }
}