GitHub Advisoryadvisory · npm
GHSA-fwx5-5fqj-jv98 Cross-Site Scripting in morris.js
MEDIUM
Official page ↗
- Aliases
- CVE-2017-16022
- Ecosystem
- npm
- Packages
- morris.js
- Severity
- Moderate
- Weaknesses
- CWE-79
- Reviewed
- 2020-06-16
Affected packages
• npm morris.js: 0.5.0 (no fix yet)
Description
Affected versions of `morris.js` are vulnerable to cross-site scripting attacks in labels that appear when hovering over a particular point on a generated graph. The text content of these labels is not escaped, so if control over the labels is obtained, script can be injected. The script will run on the client side whenever that specific graph is loaded.
Recommendation
A patch for this vulnerability was created in 2014, but has still not been published to npm. In order to mitigate this issue effectively, install the library from github via:
```
npm i morrisjs/morris.js -s
```
Related
Alias · CVE (1)
- CVE-2017-16022 Morris.js creates an svg graph, with labels that appear when hovering over a point. vulnerability
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness