CVE Feed
7.5 High

Mongoose: sanitizeProjection can be bypassed to include fields deselected with `select: false`

CVE-2026-142596

Summary 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. Details Given: javascript const User = mongoose.model('User', new Schema({ name: String, password: { type: String, select: false }, profile: { bio: String, ssn: { type: String, select: false } }, secrets: { type: Map, of: String, select: false }, recoveryCodes: { type: [String], select: false }, tags: [String], comments: [{ text: String, secret: { type: String, select: false } }] })); each of the following returned select: false data with sanitizeProjection enabled: | Projection | Why it got through | | --- | --- | | select('-name +password') | +path was only blocked in inclusive projections | | select('-+password') | Collapsing - paths turned it into +password…

Assessment

CVSS
7.5 (v3.1)
Severity
High
EPSS
0.00685% chance of exploitation in the next 30 days
Known exploited
Not listed in CISA KEV
Exploit availability
Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
Published
4 December 2026
Last updated
4 December 2026
Weakness
CWE-200
Assigner
GitHub_M

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

At the source

References

Community proofs of concept

No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.

Submit a proof of concept
Before you submit *

Query this programmatically

Agents can read this through the MCP endpoint, or over HTTP:

curl https://cve.zerocrew.in/api/cve/CVE-2026-142596