Skip to content

CVE-2026-142595 Mongoose: `sanitizeFilter` bypass via MongoDB internal top-level query operators such as `$_internalSchemaXor`

MediumCVSS 6.5
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial

Description

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 6.0.0 until 6.13.13, 7.8.14, 8.24.10, and 9.12.2, Mongoose's sanitizeFilter rejects only a small named set of top-level operators and does not recursively inspect undocumented operators such as $_internalSchemaXor and $_internalSchemaCond. Applications that pass attacker-controlled filter keys to queries while relying on sanitizeFilter can therefore accept nested selectors such as $ne or $regex, allowing authentication bypass, disclosure of protected values through boolean queries, or unintended updates and deletions. Applications that construct filters from individual primitive values are not affected by this bypass. This issue is fixed in versions 6.13.13, 7.8.14, 8.24.10, and 9.12.2.

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
npm mongoose(npm) < 6.13.13; >= 7.0.0, < 7.8.14; >= 8.0.0, < 8.24.10; >= 9.0.0, < 9.12.2 6.13.13, 7.8.14, 8.24.10, 9.12.2 Fixed
automattic mongoose = >= 6.0.0, < 6.13.13; = >= 7.0.0, < 7.8.14; = >= 8.0.0, < 8.24.10; = >= 9.0.0, < 9.12.2 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
automattic mongoose = >= 6.0.0, < 6.13.13 No fix listed
automattic mongoose = >= 7.0.0, < 7.8.14 No fix listed
automattic mongoose = >= 8.0.0, < 8.24.10 No fix listed
automattic mongoose = >= 9.0.0, < 9.12.2 No fix listed
npm mongoose(npm) < 6.13.13 6.13.13
npm mongoose(npm) >= 7.0.0, < 7.8.14 7.8.14
npm mongoose(npm) >= 8.0.0, < 8.24.10 8.24.10
npm mongoose(npm) >= 9.0.0, < 9.12.2 9.12.2

References