cvelo
P2 · HighCVSS 7.5EPSS 0.7%

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

  • CVE-2026-142596
  • GHSA-xfcm-rmv3-crmq
  • EUVD-2026-141931

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.

Text from the CVE.org record.

Recommendation

Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • Automattic mongoose

    Affected versionsFixed in
    >= 8.5.0, < 8.24.10none stated
    >= 9.0.0, < 9.12.2none stated
  • mongoosenpm

    Affected versionsFixed in
    from 9.0.0 to before 9.12.29.12.2
    from 8.5.0 to before 8.24.108.24.10

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.