Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. mongoose
  4. ›
  5. CVE-2026-142596

CVE-2026-142596: Mongoose: sanitizeProjection can be bypassed to include fields deselected with `select: false`

December 4, 2026

Since Mongoose 8.5.0, the sanitizeProjection option prevents untrusted projections from including fields that the schema deselects with select: false, like password hashes and reset tokens. Several projection forms got around that check, so a user-controlled projection could still return select: false fields even with sanitizeProjection enabled.

Mongoose versions before 8.5.0 do not make sanitizeProjection block including select: false keys - hiding select: false keys was a new feature introduced in Mongoose 8.5.0.

References

  • github.com/Automattic/mongoose/commit/c369da407ee8bea907bb5af7bb94ce5deeb3e0e4
  • github.com/Automattic/mongoose/commit/c5483b71438ececde3a272feef65e14666614093
  • github.com/Automattic/mongoose/releases/tag/8.24.10
  • github.com/Automattic/mongoose/releases/tag/9.12.2
  • github.com/Automattic/mongoose/security/advisories/GHSA-xfcm-rmv3-crmq
  • github.com/advisories/GHSA-xfcm-rmv3-crmq
  • nvd.nist.gov/vuln/detail/CVE-2026-142596

Code Behaviors & Features

Detect and mitigate CVE-2026-142596 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 8.5.0 before 8.24.10, all versions starting from 9.0.0 before 9.12.2

Fixed versions

  • 8.24.10
  • 9.12.2

Solution

Upgrade to versions 8.24.10, 9.12.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

Source file

npm/mongoose/CVE-2026-142596.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 04 Dec 2026 00:16:51 +0000.