# CVE-2019-17495: Cross-site scripting in Swagger-UI

> Attackers can exfiltrate sensitive data like CSRF tokens via CSS injection in Swagger UI, requiring an upgrade to mitigate.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Oct 2019
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-c427-hjc3-wrfw

## What is CVE-2019-17495?

CVE-2019-17495 is a critical cross-site scripting vulnerability in Oracle Banking Platform, published on 10 Oct 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-352 (Cross-Site Request Forgery)

## Which versions are affected by CVE-2019-17495?

8 open source packages ship an affected version, including io.springfox:springfox-swagger-ui, org.webjars.npm:swagger-ui and org.webjars:swagger-ui. It affects 6 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `io.springfox:springfox-swagger-ui` | Maven | All versions | 2.10.0 |
| `io.springfox:springfox-swagger-ui` | Maven | All versions | 2.10.0 |
| `org.webjars.npm:swagger-ui` | Maven | All versions | 3.23.11 |
| `org.webjars.npm:swagger-ui` | Maven | All versions | 3.23.11 |
| `org.webjars:swagger-ui` | Maven | All versions | 3.23.11 |
| `org.webjars:swagger-ui` | Maven | All versions | 3.23.11 |
| `swagger-ui` | npm | All versions | 3.23.11 |
| `swagger-ui` | npm | All versions | 3.23.11 |

Products: Oracle Banking Apis, Oracle Banking Digital Experience, Oracle Banking Platform, Oracle Primavera Gateway, Oracle Utilities Framework, Smartbear Swagger Ui.

## How do I fix CVE-2019-17495?

Upgrade io.springfox:springfox-swagger-ui to 2.10.0 or later.

## Is CVE-2019-17495 being exploited?

There is no known exploitation of CVE-2019-17495 in the wild and no public exploit code.

Public exploit code:

- https://github.com/SecT0uch/CVE-2019-17495-test (github_poc): https://github.com/SecT0uch/CVE-2019-17495-test

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-17495 and fix it if it is affected.

What it is: CVE-2019-17495 is a critical cross-site scripting vulnerability in Oracle Banking Platform, published on 10 Oct 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2019-17495 in the wild and no public exploit code.

Affected packages and fixed versions:
- io.springfox:springfox-swagger-ui (Maven): affected all versions; fixed in 2.10.0
- io.springfox:springfox-swagger-ui (Maven): affected all versions; fixed in 2.10.0
- org.webjars.npm:swagger-ui (Maven): affected all versions; fixed in 3.23.11
- org.webjars.npm:swagger-ui (Maven): affected all versions; fixed in 3.23.11
- org.webjars:swagger-ui (Maven): affected all versions; fixed in 3.23.11
- org.webjars:swagger-ui (Maven): affected all versions; fixed in 3.23.11
- swagger-ui (npm): affected all versions; fixed in 3.23.11
- swagger-ui (npm): affected all versions; fixed in 3.23.11

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-17495/ (Markdown: https://insights.sbomify.com/CVE-2019-17495/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-17495
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-17495
- OSV: https://osv.dev/vulnerability/CVE-2019-17495

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-17495/
Summaries are generated and may contain mistakes; the official description above is the record.
