GHSA-22q9-hqm5-mhmc

Suggest an improvement
Source
https://github.com/advisories/GHSA-22q9-hqm5-mhmc
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-22q9-hqm5-mhmc/GHSA-22q9-hqm5-mhmc.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-22q9-hqm5-mhmc
Published
2020-09-11T21:22:24Z
Modified
2021-09-28T17:01:08Z
Summary
Cross-Site Scripting in swagger-ui
Details

Versions of swagger-ui prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package fails to encode output in GET requests. The request is meant to respond with Content-Type application/json which does not trigger the vulnerability but if the web server changes the header to text/html it may allow attackers to execute arbitrary JavaScript.

Recommendation

Upgrade to version 2.2.1 or later.

Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-08-31T18:43:08Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
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-22q9-hqm5-mhmc/GHSA-22q9-hqm5-mhmc.json"