{"id":"CVE-2016-1000233","aliases":["GHSA-mrx7-8hxf-f853"],"status":"published","title":"Cross-Site Scripting in swagger-ui","description":"Affected versions of `swagger-ui` are vulnerable to cross-site scripting. This vulnerability exists because `swagger-ui` automatically executes external Javascript that is loaded in via the `url` query string parameter when a `Content-Type: application/javascript` header is included.\n\nAn attacker can create a server that replies with a malicious script and the proper content-type, and then craft a `swagger-ui` URL that includes the location to their server/script in the `url` query string parameter. When viewed, such a link would execute the attacker's malicious script.\n\n\n## Recommendation\n\nUpdate to 2.2.1 or later.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2020-09-01T15:36:27Z","modified":"2023-11-08T03:58:07Z","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/1863","tags":["web"]},{"url":"https://www.npmjs.com/advisories/131","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-1000233","tags":["advisory"]},{"url":"https://github.com/swagger-api/swagger-ui/commit/331d2be070d89162aa3174a8773ae4a0093f78bc","tags":["web"]},{"url":"https://github.com/advisories/GHSA-mrx7-8hxf-f853"},{"url":"https://github.com/swagger-api/swagger-ui","tags":["web"]}],"sources":{"ghsa":[{"id":"GHSA-mrx7-8hxf-f853","title":"Cross-Site Scripting in swagger-ui","description":"Affected versions of `swagger-ui` are vulnerable to cross-site scripting. This vulnerability exists because `swagger-ui` automatically executes external Javascript that is loaded in via the `url` query string parameter when a `Content-Type: application/javascript` header is included.\n\nAn attacker can create a server that replies with a malicious script and the proper content-type, and then craft a `swagger-ui` URL that includes the location to their server/script in the `url` query string parameter. When viewed, such a link would execute the attacker's malicious script.\n\n\n## Recommendation\n\nUpdate to 2.2.1 or later.","status":"published","published":"2020-09-01T15:36:27Z","modified":"2023-10-10T21:02:42Z","cwes":["CWE-79"],"updated_at":"2026-11-02T14:37:08.847568Z"}],"osv":[{"id":"GHSA-mrx7-8hxf-f853","title":"Cross-Site Scripting in swagger-ui","description":"Affected versions of `swagger-ui` are vulnerable to cross-site scripting. This vulnerability exists because `swagger-ui` automatically executes external Javascript that is loaded in via the `url` query string parameter when a `Content-Type: application/javascript` header is included.\n\nAn attacker can create a server that replies with a malicious script and the proper content-type, and then craft a `swagger-ui` URL that includes the location to their server/script in the `url` query string parameter. When viewed, such a link would execute the attacker's malicious script.\n\n\n## Recommendation\n\nUpdate to 2.2.1 or later.","status":"published","published":"2020-09-01T15:36:27Z","modified":"2023-11-08T03:58:07.968864Z","cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:52.170928Z"}]}}
