GHSA-v9wp-8r97-v6xg

Suggest an improvement
Source
https://github.com/advisories/GHSA-v9wp-8r97-v6xg
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-v9wp-8r97-v6xg/GHSA-v9wp-8r97-v6xg.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-v9wp-8r97-v6xg
Published
2020-09-03T17:17:00Z
Modified
2020-08-31T18:44:56Z
Summary
Cross-Site Scripting in jquery.json-viewer
Details

Versions of jquery.json-viewer prior to 1.3.0 are vulnerable to Cross-Site Scripting (XSS). The package insufficiently sanitizes user input when creating links, and concatenates the user input in an <a> tag. This allows attackers to create malicious links with JSON payloads such as:

{
  "foo": "https://bar.com\" onmouseover=alert('xss') \""
}

This may lead to arbitrary JavaScript execution in a victim's browser.

Recommendation

Upgrade to version 1.3.0 or later.

Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-08-31T18:44:56Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

npm / jquery.json-viewer

Package

Name
jquery.json-viewer
View open source insights on deps.dev
Purl
pkg:npm/jquery.json-viewer

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.3.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-v9wp-8r97-v6xg/GHSA-v9wp-8r97-v6xg.json"