mongoose
9.12.2 · 16 Nov 2026MIT9.5M / weekRepositoryHomepagenpmAtom feed
Upgrading mongoose From 5.13.23 to 6.13.12
122 releases in betweennotes for 76
Reading releases, release notes and advisories…
Counted from 76 of 122 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- Breaking6.0.12
- Deprecated6.8.0
Security
Fixes 7 advisories affecting 5.13.23
- Mongoose: Prototype pollution in mongoose update casting via __proto__-prefixed dotted path (Schema._getSchema/path getter)moderate · GHSA-664h-wqgq-64gw
- Mongoose: Prototype pollution via Schema.prototype.virtual()moderate · GHSA-6972-9mcm-vhwj
- Mongoose walks into inherited properties when hydrating, setting, and merging, allowing overwrites of built-in functions (denial of service) and shared schema statehigh · GHSA-8332-j7wj-wjw4
- Mongoose: sanitizeFilter not applied on countDocumentscritical · GHSA-pcrw-h46h-c93h
- Mongoose search injection vulnerabilitycritical · GHSA-vg7j-7cwx-8wgw
- Mongoose's Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL Injectionhigh · GHSA-wpg9-53fq-2r8h
- Mongoose: Discriminator key values matching inherited properties (e.g. __t: 'constructor') bypass schema casting and can poison collectionsmoderate · GHSA-wr5m-5jph-8m96
Release by release
6.13.12no release note
- Fixed
query: Apply sanitizeFilter in countDocuments and cursor
- Fixed
6.13.10no release note
- New
types(aggregate): add $firstN, $lastN, $bottom, $bottomN, $minN and $maxN operators #15303 #15299
- Fixed
Handle other top-level query operators in sanitizeFilter
- New
6.13.7 – 6.13.82 releases, nothing new or fixed in the notes
- Fixed
Disallow nested $where in populate match
- Fixed
6.10.2 – 6.13.527 releases, no release note
- Fixed
Avoid removing empty query filters in
$andand$or#13086 #12898 - Fixed
schematype: Fixed validation for required UUID field #13018 lpizzinidev
- Fixed
types: Add missing Paths generic param to
Model.populate()#13070
- Fixed
168 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.