Cross-site scripting in Swagger-UI
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| swagger-ui npm |
|
|
| org.webjars:swagger-ui Maven |
|
|
| org.webjars.npm:swagger-ui Maven |
| Product | Affected | Fixed in |
|---|---|---|
| swagger-ui npm |
|
|
| org.webjars:swagger-ui Maven |
|
|
| org.webjars.npm:swagger-ui Maven |
< 3.23.11
|
| io.springfox:springfox-swagger-ui Maven |
|
|
A Cascading Style Sheets (CSS) injection vulnerability in Swagger UI before 3.23.11 allows attackers to use the Relative Path Overwrite (RPO) technique to perform CSS-based input field value exfiltration, such as exfiltration of a CSRF token value. In other words, this product intentionally allows the embedding of untrusted JSON data from remote servers, but it was not previously known that <style>@import within the JSON data was a functional attack method.
From the CVE record · mitre
Swagger UI before 3.23.11 is vulnerable to CSS injection when it embeds untrusted JSON from remote servers. An attacker can use Relative Path Overwrite and a functional <style>@import in that JSON to exfiltrate input field values, such as a CSRF token. The input does not specify authentication requirements or whether user interaction is needed.
Teams using npm swagger-ui or Maven org.webjars:swagger-ui or org.webjars.npm:swagger-ui below 3.23.11, or Maven io.springfox:springfox-swagger-ui below 2.10.0, should check their dependencies.