# GHSA-4f9m-pxwh-68hg: Cross-Site Scripting in swagger-ui

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-11T21:20:14.000Z
- Modified: 2021-09-28T16:57:07.000Z
- Weaknesses: CWE-79

## Description

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.


## Recommendation

Upgrade to version 3.20.9 or later.

(As written by GitHub Advisory Database.)

## Affected

- swagger-ui (npm): before 3.20.9

## References

- <https://github.com/swagger-api/swagger-ui/pull/5190> (web)
- <https://github.com/swagger-api/swagger-ui/commit/1e184e8e218676278c83e60a45846c199ce3d15e> (web)
- <https://github.com/swagger-api/swagger-ui> (package)
- <https://snyk.io/vuln/SNYK-JS-SWAGGERUI-449921> (web)

## Sources

- GitHub Advisory Database: [GHSA-4f9m-pxwh-68hg](https://github.com/advisories/GHSA-4f9m-pxwh-68hg), CC-BY-4.0, modified 2021-09-28

---

Page: https://cve.day/GHSA-4f9m-pxwh-68hg · Whole record: https://cve.day/GHSA-4f9m-pxwh-68hg.json · Rebuilt by cve.day 2026-11-25T22:56:43.987Z
