{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "6.13.11"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "7.0.0"
                  },
                  {
                    "fixed": "7.8.12"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "8.0.0"
                  },
                  {
                    "fixed": "8.24.3"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "9.0.0"
                  },
                  {
                    "fixed": "9.9.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "fixed": "7e912af3fac52cb0eea4cd71e24d65318916831a"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "8b10d5760bb181f5bf5d01495cde161c8aed0557"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "b1df045aab076b740fdaec14a15a44c694b85b7d"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "b5003d3915db1cf9209c38a4b93cf3a92cddd710"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "6.13.11",
                "range": [
                  {
                    "fixed": "60333ee82b9018265d000346943ee45f1a9052a9"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "7.8.12",
                "range": [
                  {
                    "fixed": "3558f100ca428de6cd0cb1a94b39256ec78cace3"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "8.24.3",
                "range": [
                  {
                    "fixed": "bd28eef52ed8c08bb434b313ffdecf0373f9612d"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "9.9.2",
                "range": [
                  {
                    "fixed": "f4f3750431e6e1a446a185ccbdab4b93076aa6d2"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "60333ee82b9018265d000346943ee45f1a9052a9"
            },
            {
              "introduced": "9b1ff1fe2ae42c985b31a57a084462a07619a546"
            },
            {
              "fixed": "3558f100ca428de6cd0cb1a94b39256ec78cace3"
            },
            {
              "introduced": "582156858db3ca7fbaa8950dc997e0d9e8117b21"
            },
            {
              "fixed": "bd28eef52ed8c08bb434b313ffdecf0373f9612d"
            },
            {
              "introduced": "93c780b6e1c24a6b4ab42c14e64a2500da87a54b"
            },
            {
              "fixed": "f4f3750431e6e1a446a185ccbdab4b93076aa6d2"
            },
            {
              "fixed": "7e912af3fac52cb0eea4cd71e24d65318916831a"
            },
            {
              "fixed": "8b10d5760bb181f5bf5d01495cde161c8aed0557"
            },
            {
              "fixed": "b1df045aab076b740fdaec14a15a44c694b85b7d"
            },
            {
              "fixed": "b5003d3915db1cf9209c38a4b93cf3a92cddd710"
            }
          ],
          "repo": "https://github.com/automattic/mongoose",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-pcrw-h46h-c93h"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-943"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125120.json"
  },
  "details": "Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.11, 7.8.12, 8.24.3, and 9.9.2, Mongoose countDocuments() does not apply the configured sanitizeFilter query selector injection defense. An application that enables sanitizeFilter and passes attacker-controlled filter values to countDocuments() can therefore process query operator objects as operators rather than literal values, causing the count to include documents that should not match and potentially undermining authorization or application logic based on that count. This issue is fixed in versions 6.13.11, 7.8.12, 8.24.3, and 9.9.2.",
  "id": "CVE-2026-125120",
  "modified": "2026-11-15T02:30:28.433280187Z",
  "published": "2026-11-09T22:36:16.207Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/6.13.11"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/7.8.12"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/8.24.3"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/9.9.2"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125120.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125120"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Mongoose: sanitizeFilter not applied on countDocuments"
}