Loading advisory.
Loading advisory.
Mongoose: sanitizeFilter not applied on countDocuments
sanitizeFilter is Mongoose's mechanism for protecting against query selector injection attacks. In older versions of Mongoose, sanitizeFilter was not applied for countDocuments() queries.
Published 2026-11-09 22:36 UTC · Modified 2026-11-27 06:55 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| mongoose | npm | < 6.13.11 >= 7.0.0, < 7.8.12 >= 8.0.0, < 8.24.3 >= 9.0.0, < 9.9.2 | 6.13.11, 7.8.12, 8.24.3, 9.9.2 | npm install mongoose@6.13.11npm install mongoose@7.8.12npm install mongoose@8.24.3npm install mongoose@9.9.2 |
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 have been released for all supported Mongoose major release lines. Please upgrade to the following versions depending on which major version of Mongoose applications are using.
^9.9.2
^8.24.3
^7.8.12
^6.13.11
Middleware:
mongoose.plugin(function() {
schema.pre('countDocuments', function() {
// This will always apply `sanitizeFilter` on `countDocuments`
mongoose.sanitizeFilter(this.getFilter());
});
});No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.006 on 2026-11-24 to 0.009 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.006 | first score | v2026.06.15 |
| 2026-11-26 | 0.009 | 0.006 | v2026.06.15 |