fix(db-mongodb): bump mongoose to 8.22.1 for GHSA-wpg9-53fq-2r8h#16672
Merged
Conversation
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖 |
denolfe
approved these changes
May 19, 2026
jacobsfletch
added a commit
that referenced
this pull request
May 19, 2026
) Identical to #16672, back-ported for 3.x.
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.
Closes #16650.
Bumps
mongoosefrom 8.15.1 to 8.22.1 in@payloadcms/db-mongodb.Also bumps
mongodbfrom 6.16.0 to 6.20.0 in@payloadcms.db-mongodbto match a transitive dependency withinmongooseand prevent duplicative installations.The
mongoose@8.15.1package is affected by GHSA-wpg9-53fq-2r8h (high severity NoSQL injection via improper $nor sanitization in sanitizeFilter). Patched in >= 8.22.1.Note: there was a breaking change in v8.17 introduced by Automattic/mongoose#15547. This change removed various properties from the
MongooseUpdateQueryOptionstype, specifically:lean,projection, andnew. Using these args throws TS errors.Instead, we rely on the more broad
QueryOptionstype, and then isolate the options per operation.Related #16688.