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

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **CWE:** CWE-200
- **Published:** 2026-12-02T21:50:31.552Z
- **Modified:** 2026-12-02T22:18:37.500Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker can bypass Mongoose sanitizeProjection using crafted projections to return fields marked select: false, such as password hashes and API keys, from MongoDB queries.

## Who should check

- Anyone running Automattic mongoose \>= 8.5.0, \< 8.24.10; \>= 9.0.0, \< 9.12.2

## Description

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.

## Affected and fixed versions

- Automattic mongoose: \>= 8.5.0, \< 8.24.10; \>= 9.0.0, \< 9.12.2 (cvelist)

## Technologies

MongoDB (AI-matched), npm packages (AI-matched)

## Mitigation

- Upgrade mongoose to 9.12.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-142596. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-142596.md
Affected: Automattic mongoose >= 8.5.0, < 8.24.10; >= 9.0.0, < 9.12.2
Fixed in: Automattic mongoose 8.24.10, Automattic mongoose 9.12.2

Steps:
1. Search this machine and project for Automattic mongoose: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-142596 being exploited?

There is no confirmed exploitation: CVE-2026-142596 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-142596?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-142596?

Automattic mongoose \>= 8.5.0, \< 8.24.10; \>= 9.0.0, \< 9.12.2.

### Is there a fix for CVE-2026-142596?

Yes. Fixed in Automattic mongoose 8.24.10, Automattic mongoose 9.12.2. Upgrade mongoose to 9.12.2 or later.

### How do I check if I'm affected by CVE-2026-142596?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/Automattic/mongoose/security/advisories/GHSA-xfcm-rmv3-crmq>
- patch: <https://github.com/Automattic/mongoose/commit/c369da407ee8bea907bb5af7bb94ce5deeb3e0e4>
- patch: <https://github.com/Automattic/mongoose/commit/c5483b71438ececde3a272feef65e14666614093>
- other: <https://github.com/Automattic/mongoose/releases/tag/8.24.10>
- other: <https://github.com/Automattic/mongoose/releases/tag/9.12.2>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-142596>

HTML: <https://flawdb.com/CVE-2026-142596> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-142596>
