{"id":"GHSA-w992-2gmj-9xxj","aliases":[],"status":"published","title":"Cross-Site Scripting in swagger-ui","description":"Versions of `swagger-ui` prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package allows HTML code in the `swagger.apiInfo.description` value without proper sanitization, which may allow attackers to execute arbitrary JavaScript.\n\n\n## Recommendation\n\nUpgrade to version 2.2.1 or later.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2020-09-11T21:23:29Z","modified":"2023-01-09T05:03:49Z","fixes":[{"ecosystem":"npm","package":"swagger-ui","fixed_in":["2.2.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"swagger-ui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.1"}]}]},{"source":"osv","ecosystem":"npm","package":"swagger-ui","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.2.1"}]}]}],"references":[{"url":"https://github.com/swagger-api/swagger-ui/issues/830","tags":["web"]},{"url":"https://www.npmjs.com/advisories/988","tags":["web"]},{"url":"https://github.com/advisories/GHSA-w992-2gmj-9xxj"},{"url":"https://github.com/swagger-api/swagger-ui","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-w992-2gmj-9xxj","title":"Cross-Site Scripting in swagger-ui","description":"Versions of `swagger-ui` prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package allows HTML code in the `swagger.apiInfo.description` value without proper sanitization, which may allow attackers to execute arbitrary JavaScript.\n\n\n## Recommendation\n\nUpgrade to version 2.2.1 or later.","status":"published","published":"2020-09-11T21:23:29Z","modified":"2023-01-09T05:03:49Z","cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:06.884904Z"}],"osv":[{"id":"GHSA-w992-2gmj-9xxj","title":"Cross-Site Scripting in swagger-ui","description":"Versions of `swagger-ui` prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package allows HTML code in the `swagger.apiInfo.description` value without proper sanitization, which may allow attackers to execute arbitrary JavaScript.\n\n\n## Recommendation\n\nUpgrade to version 2.2.1 or later.","status":"published","published":"2020-09-11T21:23:29Z","modified":"2021-09-28T17:02:50Z","cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:58.401149Z"}]}}
