GitHub Advisoryadvisory · npm

GHSA-7f59-x49p-v8mq Cross-Site Scripting in swagger-ui

CRITICAL Published 2020-09-01 Modified 2021-09-23 Official page ↗
Aliases
CVE-2016-1000226
Ecosystem
npm
Packages
swagger-ui
Severity
Critical
Weaknesses
CWE-79
Reviewed
2020-08-31

Affected packages

• npm swagger-ui: < 2.2.1 → fixed in 2.2.1

Description

Affected versions of `swagger-ui` are vulnerable to cross-site scripting in both the `consumes` and `produces` parameters of the swagger JSON document for a given API. Additionally, `swagger-ui` allows users to load arbitrary swagger JSON documents via the query string parameter `url`, allowing an attacker to exploit this attack against any user that the attacker can convince to visit a crafted link. Proof of Concept ``` http:///swagger-ui/index.html?url=http:///malicious-swagger-file.json ```` Recommendation Update to version 2.2.1 or later.

Related

Alias · not in database (1)

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References