# GHSA-w992-2gmj-9xxj: Cross-Site Scripting in swagger-ui

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-11T21:23:29.000Z
- Modified: 2021-09-28T17:02:50.000Z
- Weaknesses: CWE-79

## 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.


## Recommendation

Upgrade to version 2.2.1 or later.

(As written by GitHub Advisory Database.)

## Affected

- swagger-ui (npm): before 2.2.1

## References

- <https://github.com/swagger-api/swagger-ui/issues/830> (web)
- <https://github.com/swagger-api/swagger-ui> (package)
- <https://www.npmjs.com/advisories/988> (web)

## Sources

- GitHub Advisory Database: [GHSA-w992-2gmj-9xxj](https://github.com/advisories/GHSA-w992-2gmj-9xxj), CC-BY-4.0, modified 2021-09-28

---

Page: https://cve.day/GHSA-w992-2gmj-9xxj · Whole record: https://cve.day/GHSA-w992-2gmj-9xxj.json · Rebuilt by cve.day 2026-11-25T22:56:46.812Z
