GHSA-22q9-hqm5-mhmc
Cross-Site Scripting in swagger-ui
GHSA-22q9-hqm5-mhmc is a vulnerability with no CVSS score yet in swagger-ui, published September 11, 2020. No source lists public exploit code. Fixed in swagger-ui 2.2.1.
- Severity
- UnratedNo CVSS score yet
- Exploit chance
- UnscoredNo EPSS score yet
- Exploitation
- None knownNot on CISA’s or ENISA’s lists
- Fixed in
2.2.1swagger-ui
Description
Versions of swagger-ui prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package fails to encode output in GET requests. The request is meant to respond with Content-Type application/json which does not trigger the vulnerability but if the web server changes the header to text/html it may allow attackers to execute arbitrary JavaScript.
Recommendation
Upgrade to version 2.2.1 or later.
Affected packages
| Package | Affected | Fixed |
|---|---|---|
swagger-uinpm | before 2.2.1 | 2.2.1 |
What each source reports
GitHub AdvisoriesNo score
Cross-Site Scripting in swagger-ui
Versions of swagger-ui prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package fails to encode output in GET requests. The request is meant to respond with Content-Type application/json which does not trigger the vulnerability but if the web server changes the header to text/html it may allow attackers to execute arbitrary JavaScript.
Recommendation
Upgrade to version 2.2.1 or later.
- Record
GHSA-22q9-hqm5-mhmc- Weakness
- CWE-79
- Updated
- 2026-11-02
OSVNo score
Cross-Site Scripting in swagger-ui
Versions of swagger-ui prior to 2.2.1 are vulnerable to Cross-Site Scripting (XSS). The package fails to encode output in GET requests. The request is meant to respond with Content-Type application/json which does not trigger the vulnerability but if the web server changes the header to text/html it may allow attackers to execute arbitrary JavaScript.
Recommendation
Upgrade to version 2.2.1 or later.
- Record
GHSA-22q9-hqm5-mhmc- Weakness
- CWE-79
- Updated
- 2026-11-02
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | GitHub Advisories, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.