{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "8.5.0"
                  },
                  {
                    "fixed": "8.24.10"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "9.0.0"
                  },
                  {
                    "fixed": "9.12.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "fixed": "c369da407ee8bea907bb5af7bb94ce5deeb3e0e4"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "c5483b71438ececde3a272feef65e14666614093"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "8.24.10",
                "range": [
                  {
                    "fixed": "f8666d81080a6699e5274d8488c690b4c8171ed6"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "9.12.2",
                "range": [
                  {
                    "fixed": "a8204d30c4db4ba1138bc75a879c79cf5127670d"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "c4c932a03ab3eeaef760dca4f6d60a738af58dc7"
            },
            {
              "fixed": "f8666d81080a6699e5274d8488c690b4c8171ed6"
            },
            {
              "introduced": "93c780b6e1c24a6b4ab42c14e64a2500da87a54b"
            },
            {
              "fixed": "a8204d30c4db4ba1138bc75a879c79cf5127670d"
            },
            {
              "fixed": "c369da407ee8bea907bb5af7bb94ce5deeb3e0e4"
            },
            {
              "fixed": "c5483b71438ececde3a272feef65e14666614093"
            }
          ],
          "repo": "https://github.com/automattic/mongoose",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-xfcm-rmv3-crmq"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-200"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142596.json"
  },
  "details": "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.",
  "id": "CVE-2026-142596",
  "modified": "2026-12-02T22:46:03.852706888Z",
  "published": "2026-12-02T21:50:31.552Z",
  "references": [
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/c369da407ee8bea907bb5af7bb94ce5deeb3e0e4"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/c5483b71438ececde3a272feef65e14666614093"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/8.24.10"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/9.12.2"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/Automattic/mongoose/security/advisories/GHSA-xfcm-rmv3-crmq"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142596.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-142596"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Mongoose: sanitizeProjection can be bypassed to include fields deselected with `select: false`"
}