Skip to content

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

@jhb-dev

Description

@jhb-dev

Summary

@payloadcms/db-mongodb@3.84.1 pins mongoose: 8.15.1 as an exact dependency. That version is vulnerable to a high-severity advisory affecting all 8.x releases before 8.22.1.

This is the same pattern as #9729 (CVE-2024-53900), where a Mongoose upgrade was applied for a prior CVE. A new advisory has since been published.

Vulnerability details

Severity Advisory Vulnerable Patched
High GHSA-wpg9-53fq-2r8h — Improper Sanitization of $nor in sanitizeFilter may allow NoSQL Injection >= 8.0.0 <= 8.22.0 >= 8.22.1

(Note: this is a different, newer advisory from CVE-2025-23061 / GHSA-vg7j-7cwx-8wgw, which was patched in mongoose@8.9.5 and is no longer present in payload's current 8.15.1 pin.)

Current pin

packages/db-mongodb/package.json declares:

"dependencies": {
  "mongoose": "8.15.1"  // exact pin — vulnerable
}

Reproduction

mkdir mongoose-cve && cd mongoose-cve
npm init -y
npm install @payloadcms/db-mongodb@3.84.1
npm audit

GHSA-wpg9-53fq-2r8h appears.

Requested fix

Bump @payloadcms/db-mongodb's declared mongoose dependency to ^8.22.1 (or wider). This is a patch-version bump within the same 8.x line, so no behavioral changes are expected for the adapter.

Workaround used downstream

Pinned via pnpm override:

overrides:
  mongoose@<8.22.1: ">=8.22.1"

Related

Environment

  • payload: 3.84.1
  • @payloadcms/db-mongodb: 3.84.1
  • Node: 22+
  • Package manager: pnpm 11

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions