# GHSA-388g-jwpg-x6j4: 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:R/S:U/C:H/I:N/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-28T17:00:22.000Z
- Weaknesses: CWE-79

## Description

Versions of `swagger-ui` prior to 3.0.13 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize YAML files imported from URLs or copied-pasted. This may allow attackers to execute arbitrary JavaScript.


## Recommendation

Upgrade to version 3.0.13 or later.

(As written by GitHub Advisory Database.)

## Affected

- swagger-ui (npm): before 3.0.13

## References

- <https://github.com/swagger-api/swagger-ui/issues/3163> (web)
- <https://github.com/swagger-api/swagger-ui> (package)
- <https://snyk.io/vuln/SNYK-JS-SWAGGERUI-449941> (web)
- <https://www.npmjs.com/advisories/985> (web)

## Sources

- GitHub Advisory Database: [GHSA-388g-jwpg-x6j4](https://github.com/advisories/GHSA-388g-jwpg-x6j4), CC-BY-4.0, modified 2021-09-28

---

Page: https://cve.day/GHSA-388g-jwpg-x6j4 · Whole record: https://cve.day/GHSA-388g-jwpg-x6j4.json · Rebuilt by cve.day 2026-11-25T22:56:43.763Z
