{"id":"GHSA-4f9m-pxwh-68hg","aliases":["GHSA-4f9m-pxwh-68hg"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-Site Scripting in swagger-ui","summary":"Versions of `swagger-ui` prior to 3.20.9 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize URLs used in the OAuth auth flow, which may allow attackers to execute arbitrary JavaScript.\n\n\n## Recommendation\n\nUpgrade to version 3.20.9 or later.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"Versions of `swagger-ui` prior to 3.20.9 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize URLs used in the OAuth auth flow, which may allow attackers to execute arbitrary JavaScript.\n\n\n## Recommendation\n\nUpgrade to version 3.20.9 or later.","format":"markdown","source":"ghsa"}],"published":"2020-09-11T21:20:14.000Z","modified":"2021-09-28T16:57:07.000Z","severity":{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.20.9"}],"ecosystem":"npm","package":"swagger-ui","purl":"pkg:npm/swagger-ui","source":"ghsa"}],"references":[{"url":"https://github.com/swagger-api/swagger-ui/pull/5190","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/swagger-api/swagger-ui/commit/1e184e8e218676278c83e60a45846c199ce3d15e","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/swagger-api/swagger-ui","tags":["package"],"sources":["ghsa"]},{"url":"https://snyk.io/vuln/SNYK-JS-SWAGGERUI-449921","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4f9m-pxwh-68hg","url":"https://github.com/advisories/GHSA-4f9m-pxwh-68hg","licence":"CC-BY-4.0","modified":"2021-09-28T16:57:07.000Z"}],"updatedAt":"2026-11-25T22:56:43.987Z"}