chore(deps): update dependency mongoose to v8.22.1 [security]#2731
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency mongoose to v8.22.1 [security]#2731renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
a4bcb23 to
98c1291
Compare
98c1291 to
9cb4b6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
8.10.1→8.22.1Mongoose's Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL Injection
CVE-2026-42334 / GHSA-wpg9-53fq-2r8h
More information
Details
Impact
This vulnerability allows bypassing Mongoose’s sanitizeFilter query sanitization mechanism via the
$noroperator.When sanitizeFilter is enabled, Mongoose wraps query operators in
$eqto neutralize them. However, prior to the fix,$norwas not included in the set of logical operators that are recursively sanitized. Because$noraccepts an array (like$andand$or), and arrays do not triggerhasDollarKeys(), malicious operators such as$ne,$gt, or$regexcould be injected inside a$norclause without being sanitized.This may lead to:
Affected users:
Applications that:
Model.findOne(req.body)) and rely onsanitizeFilterto strip out query selectorsApplications that validate input schemas, whitelist fields, or avoid passing raw request bodies into queries are not affected. For example,
Model.findOne({ user: req.body.user, pwd: req.body.pwd })is not affected.Patches
Patches have been released for all supported Mongoose release lines:
^6.13.9^7.8.9^8.22.1^9.1.6Workarounds
Delete
$norkeys, use an additional schema validation library, or write middleware to strip out$norfrom query filters.Resources
sanitizeFilter documentation: https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.sanitizeFilter()
Original blog post on sanitizeFilter: https://thecodebarbarian.com/whats-new-in-mongoose-6-sanitizefilter.html
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
Automattic/mongoose (mongoose)
v8.22.1Compare Source
==================
v8.22.0Compare Source
8.22.0 / 2026-01-27
v8.21.1Compare Source
===================
v8.21.0Compare Source
===================
v8.20.4Compare Source
===================
v8.20.3Compare Source
===================
v8.20.2Compare Source
===================
v8.20.1Compare Source
===================
v8.20.0Compare Source
===================
v8.19.4Compare Source
===================
v8.19.3Compare Source
===================
v8.19.2Compare Source
===================
v8.19.1Compare Source
===================
v8.19.0Compare Source
===================
v8.18.3Compare Source
===================
v8.18.2Compare Source
===================
v8.18.1Compare Source
===================
v8.18.0Compare Source
===================
v8.17.2Compare Source
===================
v8.17.1Compare Source
===================
v8.17.0Compare Source
===================
v8.16.5Compare Source
===================
v8.16.4Compare Source
===================
v8.16.3Compare Source
===================
v8.16.2Compare Source
===================
v8.16.1Compare Source
===================
v8.16.0Compare Source
===================
v8.15.2Compare Source
===================
v8.15.1Compare Source
===================
v8.15.0Compare Source
===================
v8.14.3Compare Source
===================
v8.14.2Compare Source
===================
v8.14.1Compare Source
===================
v8.14.0Compare Source
===================
v8.13.3Compare Source
===================
v8.13.2Compare Source
===================
v8.13.1Compare Source
===================
v8.13.0Compare Source
===================
v8.12.2Compare Source
===================
v8.12.1Compare Source
===================
v8.12.0Compare Source
===================
v8.11.0Compare Source
===================
v8.10.2Compare Source
===================
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.