CVE-2026-142596
Mongoose: sanitizeProjection can be bypassed to include fields deselected with `select: false`
Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 8.5.0 until 8.24.10 and 9.12.2, Mongoose's sanitizeProjection can be bypassed by +path selections, object or array aggregation expressions, nested and parent projections, positional projections, $meta, discriminator-specific exclusions, an own __proto__ key, and projection-cast error paths. Applications that pass attacker-controlled data to select(), find(filter, projection), or the projection option while relying on sanitizeProjection can return fields marked select: false, including password hashes, reset tokens, API keys, and nested secrets. Nested exclusion objects, $elemMatch combined with an exclusion or a cast error, and discriminator filters can also cause ordinary queries that do not enable sanitizeProjection to omit the select: false exclusions that Mongoose normally adds. This issue is fixed in versions 8.24.10 and 9.12.2.
Fixes and workarounds
No remediation reported in collected sources.
Missing remediation information is not evidence that no patch exists.
Affected products and versions
| Product | Versions | Authority |
|---|---|---|
| mongoose Automattic |
>= 8.5.0, < 8.24.10 (affected) >= 9.0.0, < 9.12.2 (affected) |
CNA: GitHub_M |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 7.5 high |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | CNA: GitHub_M |
Exploit evidence
No exploit evidence in collected sources. This is not proof of no exploitation.
References
- https://github.com/Automattic/mongoose/security/advisories/GHSA-xfcm-rmv3-crmqCNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/Automattic/mongoose/commit/c369da407ee8bea907bb5af7bb94ce5deeb3e0e4CNA: GitHub_M · x_refsource_MISC
- https://github.com/Automattic/mongoose/commit/c5483b71438ececde3a272feef65e14666614093CNA: GitHub_M · x_refsource_MISC
- https://github.com/Automattic/mongoose/releases/tag/8.24.10CNA: GitHub_M · x_refsource_MISC
- https://github.com/Automattic/mongoose/releases/tag/9.12.2CNA: GitHub_M · x_refsource_MISC
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.