← Terug naar overzicht

sift.js version 17.1.3 contains a critical vulnerability where the library enumerates query keys using for...in, which traverses the object prototype chain and dispatches matched operator keys including $where. The $where operator compiles string values into executable functions via new Function(), which is enabled by default (CSP_ENABLED is not set by default). This creates two attack vectors: first, if a prototype-pollution primitive elsewhere sets Object.prototype.$where to a malicious string, even benign sift({}) calls execute arbitrary JavaScript; second, passing an untrusted query object with a string $where directly to sift results in immediate code execution. The vulnerability effectively chains prototype pollution with arbitrary code execution in Node.js environments using this widely-used MongoDB-style query filtering library. Mitigation requires enabling CSP_ENABLED or upgrading to a patched version. The issue has been reported via GitHub and tracked by VulnCheck.

Affected products

  • sift.js 17.1.3

Related CVE's

  • CVE-2026-85625

Categories

  • Supply Chain & Dependencies
  • Web Technologies
  • Zero-Day Vulnerabilities