Description
sift (sift.js) 17.1.3 enumerates query keys with for...in, which walks the object prototype chain, and dispatches any matched operator key including $where. The $where operation compiles a string value into a function using new Function unless CSP_ENABLED is set (not set by default). As a result, if a prototype-pollution primitive elsewhere in the process sets Object.prototype.$where to a malicious string, even benign filter calls such as sift({}) execute arbitrary JavaScript. Additionally, passing an untrusted query object containing a string $where directly to sift results in code execution under the default configuration.
Published: 2026-09-04
Score: 9.2 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw in sift.js version 17.1.3 allows an attacker to pollute the Object prototype chain to inject a malicious $where property that is later compiled into executable code. Because the library iterates over query keys with a for…in loop, it blindly accepts any operator named in the key hierarchy. When CSP_ENABLED is not set, the $where value is turned into a Function via new Function, giving the attacker the ability to run arbitrary JavaScript, which can compromise the server or client runtime. This is a severe remote code execution vulnerability categorized under CWE-1321.

Affected Systems

The affected product is sift.js, a JavaScript library released under the name crcn:sift.js, specifically version 17.1.3. Users running this version in their Node or browser environments are vulnerable. No other versions or products are currently reported to be affected.

Risk and Exploitability

The vulnerability has a CVSS score of 9.2, indicating critical severity. EPSS data is not available, and it is not listed in the CISA KEV catalog. The most likely exploitation route is through any user input that is passed to sift without validation, as the library will immediately execute the $where string. An attacker can also exploit manufacturer pollution to inject malicious code. Because the attack does not require privileged execution on the host and only needs to supply a crafted query, the risk to systems that expose sift to external inputs is high.

Generated by OpenCVE AI on September 4, 2026 at 15:24 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade sift.js to the latest released version that removes the $where operator or correctly sanitizes prototype chain handling.
  • Set the environment variable CSP_ENABLED=true to prevent the $where operator from compiling JavaScript, thereby blocking arbitrary code execution.
  • Sanitize all query objects before passing them to sift by stripping keys that begin with "$" or by whitelisting only allowed operators to eliminate prototype pollution.

Generated by OpenCVE AI on September 4, 2026 at 15:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 14:45:00 +0000

Type Values Removed Values Added
Description sift (sift.js) 17.1.3 enumerates query keys with for...in, which walks the object prototype chain, and dispatches any matched operator key including $where. The $where operation compiles a string value into a function using new Function unless CSP_ENABLED is set (not set by default). As a result, if a prototype-pollution primitive elsewhere in the process sets Object.prototype.$where to a malicious string, even benign filter calls such as sift({}) execute arbitrary JavaScript. Additionally, passing an untrusted query object containing a string $where directly to sift results in code execution under the default configuration.
Title sift 17.1.3 Prototype Pollution Remote Code Execution via $where
Weaknesses CWE-1321
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-09-04T14:32:15.388Z

Reserved: 2026-09-04T11:03:33.316Z

Link: CVE-2026-85625

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T15:17:42.880

Modified: 2026-09-04T15:17:42.880

Link: CVE-2026-85625

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T15:30:07Z

Weaknesses
  • CWE-1321

    Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')