Cross-site scripting in Swagger-UI
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | io.springfox:springfox-swagger-ui | < 2.10.0 | 2.10.0 |
| Java / Kotlin (Maven) | org.webjars.npm:swagger-ui | < 3.23.11 | 3.23.11 |
| Java / Kotlin (Maven) | org.webjars:swagger-ui | < 3.23.11 | 3.23.11 |
| npm package | swagger-ui | < 3.23.11 | 3.23.11 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2019-17495
- https://github.com/springfox/springfox/commit/26f72f0d16b166e12c20255a4ee907dc10685cf8
- https://github.com/swagger-api/swagger-ui
- https://github.com/swagger-api/swagger-ui/releases/tag/v3.23.11
- https://github.com/tarantula-team/CSS-injection-in-Swagger-UI
- https://lists.apache.org/thread.html/r103579b01da2d0aa0f672b88f811224bbf8ef493aaad845895955e91@%3Ccommits.airflow.apache.org%3E
- https://lists.apache.org/thread.html/r3acb7e494cf1aab99b6784b7c5bbddfd0d4f8a484ab534c3a61ef9cf@%3Ccommits.airflow.apache.org%3E
- https://lists.apache.org/thread.html/r84b327f7a8b6b28857b906c07a66dd98e1d341191fa8d7816514ef96@%3Ccommits.airflow.apache.org%3E
- https://lists.apache.org/thread.html/r853ffeb915a400f899de78124d4e0d77a19379d2e11bf8f4e98c624f@%3Ccommits.airflow.apache.org%3E
- https://lists.apache.org/thread.html/ref70b940c4f69560d29d6ba792d6c82865e74de3dcad4c92d99b1f8f@%3Ccommits.airflow.apache.org%3E
- https://security.snyk.io/vuln/maven?search=CVE-2019-17495
- https://www.oracle.com/security-alerts/cpuApr2021.html
- https://www.oracle.com/security-alerts/cpujan2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://www.oracle.com/security-alerts/cpuoct2020.html
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-352, CWE-79- Platform
- Java / Kotlin (Maven), npm
- Package
io.springfox:springfox-swagger-ui, org.webjars.npm:swagger-ui, org.webjars:swagger-ui- Disclosed
- 15.10.2019
- Updated
- 11.10.2026 12:21
Sources and licenses
OSV / GitHub Advisory Database - GHSA-c427-hjc3-wrfw - CC BY 4.0
Vulnerability history: swagger-ui
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 14
- First → latest
- 06.2019 05.2022
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 4
- High 1
- Medium 9
Disclosures per year
- 2019: 2
- 2020: 9
- 2021: 1
- 2022: 2
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Cross-site scripting in Swagger-UI this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.