# CVE-2019-17495: Swagger-UI CSS injection via Relative Path Overwrite

Source: https://junglewise.ai/threats/cve-2019-17495-swagger-ui-css-injection-via-relative-path-overwrite  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2019-10-15. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2019-17495 · Severity: low · CVSS 3.1 · Published 2019-10-15

Swagger-UI is an open-source framework for documenting and testing REST APIs. A CSS injection vulnerability allows attackers to manipulate styling rules to steal sensitive data like CSRF tokens from form fields displayed in the UI, potentially compromising API security and user sessions.

Technologies: [swagger-ui (npm)](https://junglewise.ai/threats/technologies/swagger-ui). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2019-17495 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2019-17495 being exploited in the wild.

**How severe is CVE-2019-17495?** Low severity, with a CVSS score of 3.1, published 15 October 2019.

**Which products and versions are affected?** io.springfox:springfox-swagger-ui (Maven) ECOSYSTEM:introduced=0,fixed=2.10.0; org.webjars:swagger-ui (Maven) ECOSYSTEM:introduced=0,fixed=3.23.11; org.webjars.npm:swagger-ui (Maven) ECOSYSTEM:introduced=0,fixed=3.23.11; swagger-ui (npm) SEMVER:introduced=0,fixed=3.23.11; and 1 more.

**Is there a fix for CVE-2019-17495?** Yes. io.springfox:springfox-swagger-ui (Maven): upgrade to 2.10.0 or later; org.webjars:swagger-ui (Maven): upgrade to 3.23.11 or later; org.webjars.npm:swagger-ui (Maven): upgrade to 3.23.11 or later; swagger-ui (npm): upgrade to 3.23.11 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2019-17495 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2019-17495?** Check whether you run io.springfox:springfox-swagger-ui (Maven), org.webjars:swagger-ui (Maven), org.webjars.npm:swagger-ui (Maven) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- io.springfox:springfox-swagger-ui (Maven): upgrade to 2.10.0 or later

  ```sh
  # set io.springfox:springfox-swagger-ui to 2.10.0 in your pom.xml or build.gradle
  ```

- org.webjars:swagger-ui (Maven): upgrade to 3.23.11 or later

  ```sh
  # set org.webjars:swagger-ui to 3.23.11 in your pom.xml or build.gradle
  ```

- org.webjars.npm:swagger-ui (Maven): upgrade to 3.23.11 or later

  ```sh
  # set org.webjars.npm:swagger-ui to 3.23.11 in your pom.xml or build.gradle
  ```

- swagger-ui (npm): upgrade to 3.23.11 or later

  ```sh
  npm install swagger-ui@3.23.11
  ```


## Technical details

A CSS injection vulnerability in Swagger-UI before version 3.23.11 allows attackers to exploit the Relative Path Overwrite (RPO) technique to inject malicious CSS rules. The vulnerability exists because Swagger-UI intentionally embeds untrusted JSON data from remote servers without properly sanitizing CSS content. An attacker can inject CSS that uses attribute selectors to exfiltrate input field values (such as CSRF tokens) to an attacker-controlled server. This attack requires network access to the Swagger-UI interface and user interaction with the page. The vulnerability is fixed in version 3.23.11 and later releases.

## Affected products

- Swagger Swagger-UI before 3.23.11
- SpringFox springfox-swagger-ui before 2.10.0

## Identifiers

- CVE-2019-17495
- GHSA-c427-hjc3-wrfw

## Timeline

- 2019-10-15: disclosed: Advisory published (GHSA-c427-hjc3-wrfw)
- 2019-10-15: patched: Fixed in Swagger-UI 3.23.11; SpringFox 2.10.0

## References

- [https://github.com/springfox/springfox/commit/26f72f0d16b166e12c20255a4ee907dc10685cf8](https://github.com/springfox/springfox/commit/26f72f0d16b166e12c20255a4ee907dc10685cf8)

## Related threats

- [swagger-ui cross-site scripting in key names](https://junglewise.ai/threats/cve-2016-1000229-swagger-ui-cross-site-scripting-in-key-names)
- [Swagger UI spoofing attack via URL parameter](https://junglewise.ai/threats/cve-2018-25031-swagger-ui-spoofing-attack-via-url-parameter)
- [Swagger UI phishing vector via URL parameter](https://junglewise.ai/threats/swagger-ui-phishing-vector-via-url-parameter-8eeaa776)
- [Swagger UI Cross-Site Scripting in apiInfo.description](https://junglewise.ai/threats/swagger-ui-cross-site-scripting-in-apiinfo-description-6b3f2dbe)
- [Swagger Swagger UI Cross-Site Scripting in API response rendering](https://junglewise.ai/threats/swagger-swagger-ui-cross-site-scripting-in-api-response-rendering-be1bf724)
