Skip to content

fix(db-mongodb): bump mongoose to 8.22.1 for GHSA-wpg9-53fq-2r8h#16672

Merged
jacobsfletch merged 6 commits into
mainfrom
deps/bump-mongodb
May 19, 2026
Merged

fix(db-mongodb): bump mongoose to 8.22.1 for GHSA-wpg9-53fq-2r8h#16672
jacobsfletch merged 6 commits into
mainfrom
deps/bump-mongodb

Conversation

@jacobsfletch
Copy link
Copy Markdown
Member

@jacobsfletch jacobsfletch commented May 18, 2026

Closes #16650.

Bumps mongoose from 8.15.1 to 8.22.1 in @payloadcms/db-mongodb.

Also bumps mongodb from 6.16.0 to 6.20.0 in @payloadcms.db-mongodb to match a transitive dependency within mongoose and prevent duplicative installations.

The mongoose@8.15.1 package 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 MongooseUpdateQueryOptions type, specifically: lean, projection, and new. Using these args throws TS errors.

Instead, we rely on the more broad QueryOptions type, and then isolate the options per operation.

Related #16688.


@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@jacobsfletch jacobsfletch merged commit 4c39be9 into main May 19, 2026
332 of 334 checks passed
jacobsfletch added a commit that referenced this pull request May 19, 2026
@jacobsfletch jacobsfletch deleted the deps/bump-mongodb branch May 19, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: @payloadcms/db-mongodb pins vulnerable mongoose@8.15.1 (GHSA-wpg9-53fq-2r8h, high severity)

2 participants