# CVE-2026-125120: Mongoose: sanitizeFilter not applied on countDocuments

Status: published. Published: 2026-11-09. Updated: 2026-11-09.

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.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Automattic / mongoose: < 6.13.11 (affected); >= 7.0.0, < 7.8.12 (affected); >= 8.0.0, < 8.24.3 (affected); >= 9.0.0, < 9.9.2 (affected). Source: CNA: GitHub_M

## Severity and prioritization

- CVSS 3.1: 9.8 (critical); CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H; source: CNA: GitHub_M

- CVSS 3.1: 9.8 (critical); CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H; source: NVD: security-advisories@github.com

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-943

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/releases/tag/6.13.11 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/releases/tag/7.8.12 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/releases/tag/8.24.3 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/releases/tag/9.9.2 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a (security-advisories@github.com)

- https://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d (security-advisories@github.com)

- https://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/releases/tag/6.13.11 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/releases/tag/7.8.12 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/releases/tag/8.24.3 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/releases/tag/9.9.2 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h (security-advisories@github.com)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2026-125120; retrieved 2026-11-09; source updated 2026-11-09

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-125120; retrieved 2026-11-10; source updated 2026-11-09

Revision: 70cb494ef754e254a3afc80e13b2ffe3dcb39e5f6dea4efc16c0756cfce1b953

Canonical: https://y2.dev/cve/CVE-2026-125120

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.