logo

GHSA-22q9-hqm5-mhmc swagger-ui

Package

Manager: npm
Name: swagger-ui
Vulnerable Version: >=0 <2.2.1

Severity

Level: Medium

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N/E:U/RL:O/RC:C

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

EPSS: N/A pctlN/A

Details

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.

Metadata

Created: 2020-09-11T21:22:24Z
Modified: 2021-09-28T17:01:08Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-22q9-hqm5-mhmc/GHSA-22q9-hqm5-mhmc.json
CWE IDs: ["CWE-79"]
Alternative ID: N/A
Finding: F008
Auto approve: 1