VYPR
Critical severityNVD Advisory· Published Oct 10, 2019· Updated Aug 5, 2024

CVE-2019-17495

CVE-2019-17495

Description

CSS injection in Swagger UI before 3.23.11 allows attackers to exfiltrate CSRF tokens via Relative Path Overwrite (RPO) using crafted JSON with @import.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

CSS injection in Swagger UI before 3.23.11 allows attackers to exfiltrate CSRF tokens via Relative Path Overwrite (RPO) using crafted JSON with @import.

What is the vulnerability?

A Cascading Style Sheets (CSS) injection vulnerability exists in Swagger UI prior to version 3.23.11 [1]. The application intentionally allows the embedding of untrusted JSON data from remote servers. It was discovered that the @import directive within JSON data can be used as an attack vector. By injecting a CSS import statement, an attacker can leverage the Relative Path Overwrite (RPO) technique to exfiltrate sensitive information from HTML input fields.

How is it exploited?

An attacker can craft a malicious JSON payload containing a @import rule and host it on a server under their control, or pass it via the url parameter in the Swagger UI query string [2]. When a victim visits a crafted link, Swagger UI loads the attacker's JSON, which triggers the browser to fetch the attacker's CSS file. Using RPO, the attacker can manipulate the CSS to read values from input fields, such as CSRF tokens, and send them to an external server.

Impact

Successful exploitation allows an attacker to extract CSRF tokens or other input field values [2]. With a CSRF token, the attacker can perform cross-site request forgery attacks on behalf of the victim, potentially leading to unauthorized actions. No authentication or direct user interaction beyond visiting the crafted URL is required.

Mitigation

The vulnerability is fixed in Swagger UI version 3.23.11 and later [1][3]. Users should upgrade to the latest version. Projects using Springfox or other libraries that bundle Swagger UI should also update their dependencies [3]. As a temporary workaround, avoid clicking on untrusted Swagger UI links, but upgrading is the recommended solution.

AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
swagger-uinpm
< 3.23.113.23.11
org.webjars:swagger-uiMaven
< 3.23.113.23.11
org.webjars.npm:swagger-uiMaven
< 3.23.113.23.11
io.springfox:springfox-swagger-uiMaven
< 2.10.02.10.0

Affected products

5

Patches

2
77f4651cbf5b

release: v3.23.11

https://github.com/swagger-api/swagger-uiswaggerhub-botSep 20, 2019via osv
6 files changed · +14 14
  • dist/swagger-ui-bundle.js+8 8 modified
  • dist/swagger-ui-bundle.js.map+1 1 modified
  • dist/swagger-ui.js+2 2 modified
  • dist/swagger-ui.js.map+1 1 modified
  • package.json+1 1 modified
    @@ -1,6 +1,6 @@
     {
       "name": "swagger-ui",
    -  "version": "3.23.10",
    +  "version": "3.23.11",
       "main": "dist/swagger-ui.js",
       "repository": "git@github.com:swagger-api/swagger-ui.git",
       "contributors": [
    
  • package-lock.json+1 1 modified
    @@ -1,6 +1,6 @@
     {
       "name": "swagger-ui",
    -  "version": "3.23.10",
    +  "version": "3.23.11",
       "lockfileVersion": 1,
       "requires": true,
       "dependencies": {
    
26f72f0d16b1

Upgrade to version of swagger which fixes css injection vulnerability as defined in https://github.com/tarantula-team/CSS-injection-in-Swagger-UI

https://github.com/springfox/springfoxHouse Edonica (maybe)Jan 5, 2020via ghsa
1 file changed · +1 1
  • springfox-swagger-ui/build.gradle+1 1 modified
    @@ -29,7 +29,7 @@ plugins {
     }
     
     ext {
    -  swaggerUiVersion = '3.23.4'
    +  swaggerUiVersion = '3.23.11'
       swaggerUiDist = "build/libs/swagger-ui-dist.zip"
       swaggerUiExplodedDir = "swagger-ui-${swaggerUiVersion}/dist/"
       downloadUrl = "https://github.com/swagger-api/swagger-ui/archive/v${swaggerUiVersion}.zip"
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

19

News mentions

0

No linked articles in our index yet.