GHSA-mrx7-8hxf-f853

Suggest an improvement
Source
https://github.com/advisories/GHSA-mrx7-8hxf-f853
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-mrx7-8hxf-f853/GHSA-mrx7-8hxf-f853.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-mrx7-8hxf-f853
Aliases
  • CVE-2016-1000233
Published
2020-09-01T15:36:27Z
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. This vulnerability exists because swagger-ui automatically executes external Javascript that is loaded in via the url query string parameter when a Content-Type: application/javascript header is included.

An attacker can create a server that replies with a malicious script and the proper content-type, and then craft a swagger-ui URL that includes the location to their server/script in the url query string parameter. When viewed, such a link would execute the attacker's malicious script.

Recommendation

Update to 2.2.1 or later.

Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-08-31T18:11:55Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
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-mrx7-8hxf-f853/GHSA-mrx7-8hxf-f853.json"