GHSA-fwx5-5fqj-jv98

Suggest an improvement
Source
https://github.com/advisories/GHSA-fwx5-5fqj-jv98
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/11/GHSA-fwx5-5fqj-jv98/GHSA-fwx5-5fqj-jv98.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-fwx5-5fqj-jv98
Aliases
Published
2018-11-09T17:46:30Z
Modified
2023-11-08T03:59:00Z
Summary
Cross-Site Scripting in morris.js
Details

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
Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-06-16T21:35:38Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

npm / morris.js

Package

Affected ranges

Affected versions

0.*
0.5.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/11/GHSA-fwx5-5fqj-jv98/GHSA-fwx5-5fqj-jv98.json"