{"id":"GHSA-22q9-hqm5-mhmc","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.\n\n\n## Recommendation\n\nUpgrade to version 2.2.1 or later.","modified":"2021-09-28T17:01:08Z","published":"2020-09-11T21:22:24Z","database_specific":{"cwe_ids":["CWE-79"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2020-08-31T18:43:08Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/swagger-api/swagger-ui/issues/1154"},{"type":"PACKAGE","url":"https://github.com/swagger-api/swagger-ui"},{"type":"WEB","url":"https://www.npmjs.com/advisories/987"}],"affected":[{"package":{"name":"swagger-ui","ecosystem":"npm","purl":"pkg:npm/swagger-ui"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"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"}}],"schema_version":"1.9.0"}