Mongoose: `sanitizeFilter` bypass via MongoDB internal top-level query operators such as `$_internalSchemaXor`
Original description The description as published by the source.
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.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com