Vulnerability · Published Nov 23, 2020 · Assigned by snyk
CVE-2020-7777Arbitrary Code Execution
High 7.2
In plain English
A high-severity security flaw in jsen. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.1% (higher than 82% of all known vulnerabilities).
Official description
This affects all versions of package jsen. If an attacker can control the schema file, it could run arbitrary JavaScript code on the victim machine. In the module description and README file there is no mention about the risks of untrusted schema files, so I assume that this is applicable. In particular the required field of the schema is not properly sanitized. The resulting string that is build based on the schema definition is then passed to a Function.apply();, leading to an Arbitrary Code Execution.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | jsen | no fix listed | GHSA-vm64-cfqx-3698 |
Affected products (as reported)
References
- https://snyk.io/vuln/SNYK-JS-JSEN-1014670 x_refsource_MISC
- https://github.com/bugventure/jsen/blob/master/lib/jsen.js%23L875 x_refsource_MISC