Mongoose sanitizeFilter Vulnerability in countDocuments
Is it fixed? Not yet.
Ongoing since Nov 10, 19:37 UTC. First reported Nov 10, 19:37 UTC. Not on the vendor’s status page yet.
What happened
Mongoose failed to apply the sanitizeFilter mechanism for countDocuments queries, leaving applications vulnerable to query selector injection attacks. Patches have been released across multiple major versions to resolve CVE-2026-125120.
What caused it?
The sanitizeFilter protection mechanism was not applied during countDocuments() queries in affected versions.
Workaround available
Upgrade Mongoose to version 6.13.11, 7.8.12, 8.24.3, 9.9.2 or later.
Official fixTimeline
- Investigating(done)
- Workaround available(current)
- Resolved(upcoming)
- First report on security advisory
Mongoose: sanitizeFilter not applied on countDocuments
Source - Workaround discovered
Workaround reported: Upgrade Mongoose to version 6.13.11, 7.8.12, 8.24.3, 9.9.2 or later.
Source - Status changed
Status changed: new → workaround_available (workaround reported in source signals).
Evidence
1 report · 1 CVEShow
- [1]CVE First reportMongoose: sanitizeFilter not applied on countDocuments(opens security advisory in a new tab)
Fixed in: mongoose 6.13.11, mongoose 7.8.12, mongoose 8.24.3, mongoose 9.9.2. Critical severity (CVE-2026-125120). Affected: mongoose (npm) < 6.13.11, >= 7.0.0, < 7.8.12, >= 8.0.0, < 8.24.3, >= 9.0.0, < 9.9.2. ### Impact `sanitizeFilter` is Mongoose's mechanism for protecting against query selector injection attacks. In older versions of Mongoose, `sanitizeFilter` was not applied for `countDocuments()` queries. ### Patches Patches have been released for all supported Mongoose major release…
by GitHub Advisory Database 0upvotes 0comments
FAQ
What happened in the npm issue?
Mongoose failed to apply the sanitizeFilter mechanism for countDocuments queries, leaving applications vulnerable to query selector injection attacks. Patches have been released across multiple major versions to resolve CVE-2026-125120.
What is affected by the npm issue?
npm (versions: < 6.13.11, >= 7.0.0 < 7.8.12, >= 8.0.0 < 8.24.3, >= 9.0.0 < 9.9.2).
When did the npm issue start and end?
It started Nov 10, 19:37 UTC and is still ongoing (8 d 9 h so far). This page updates as it develops.
How do I get alerts for npm?
Subscribe to the npm RSS feed for every new npm incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether npm is down. npm feed
Where does this information come from?
WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.