# CVE-2024-21485: Dash apps vulnerable to Cross-site Scripting

> An authenticated attacker can steal data and access tokens from other users via XSS in Dash apps that store and reload user input.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 2 Feb 2024
- **Updated:** 15 May 2025
- **Also known as:** GHSA-547x-748v-vp6p, PYSEC-2024-35, PYSEC-2026-219, PYSEC-2026-220

## What is CVE-2024-21485?

CVE-2024-21485 is a medium-severity cross-site scripting vulnerability in dash, published on 2 Feb 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Versions of the package dash-core-components before 2.13.0; versions of the package dash-core-components before 2.0.0; versions of the package dash before 2.15.0; versions of the package dash-html-components before 2.0.0; versions of the package dash-html-components before 2.0.16 are vulnerable to Cross-site Scripting (XSS) when the href of the a tag is controlled by an adversary. An authenticated attacker who stores a view that exploits this vulnerability could steal the data that's visible to another user who opens that view - not just the data already included on the page, but they could also, in theory, make additional requests and access other data accessible to this user. In some cases, they could also steal the access tokens of that user, which would allow the attacker to act as that user, including viewing other apps and resources hosted on the same server.**Note:**This is only exploitable in Dash apps that include some mechanism to store user input to be reloaded by a different user.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2024-21485?

13 open source packages ship an affected version, including dash-core-components, dash and dash-html-components. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `dash-core-components` | PyPI | All versions | 2.0.0 |
| `dash-core-components` | PyPI | All versions | 2.0.0 |
| `dash-core-components` | PyPI | All versions | 2.0.0 |
| `dash-core-components` | npm | All versions | 2.13.0 |
| `dash-core-components` | npm | All versions | 2.13.0 |
| `dash` | PyPI | All versions | 2.13.0, 2.15.0 |
| `dash` | PyPI | All versions | 2.15.0 |
| `dash` | PyPI | All versions | 2.15.0 |
| `dash-html-components` | PyPI | All versions | 2.0.0 |
| `dash-html-components` | PyPI | All versions | 2.0.0 |
| `dash-html-components` | PyPI | All versions | 2.0.0 |
| `dash-html-components` | npm | All versions | 2.0.16 |
| `dash-html-components` | npm | All versions | 2.0.16 |

Products: Plotly Dash.

## How do I fix CVE-2024-21485?

Upgrade dash-core-components to a fixed version for your release line: 2.0.0 or 2.13.0.

## Is CVE-2024-21485 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21485 exists.

Public exploit code:

- Dash Framework - Cross-site Scripting (nuclei): http/cves/2024/CVE-2024-21485.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-21485 and fix it if it is affected.

What it is: CVE-2024-21485 is a medium-severity cross-site scripting vulnerability in dash, published on 2 Feb 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21485 exists.

Affected packages and fixed versions:
- dash-core-components (PyPI): affected all versions; fixed in 2.0.0
- dash-core-components (PyPI): affected all versions; fixed in 2.0.0
- dash-core-components (PyPI): affected all versions; fixed in 2.0.0
- dash-core-components (npm): affected all versions; fixed in 2.13.0
- dash-core-components (npm): affected all versions; fixed in 2.13.0
- dash (PyPI): affected all versions; fixed in 2.13.0, 2.15.0
- dash (PyPI): affected all versions; fixed in 2.15.0
- dash (PyPI): affected all versions; fixed in 2.15.0
- dash-html-components (PyPI): affected all versions; fixed in 2.0.0
- dash-html-components (PyPI): affected all versions; fixed in 2.0.0
- dash-html-components (PyPI): affected all versions; fixed in 2.0.0
- dash-html-components (npm): affected all versions; fixed in 2.0.16

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-2024-21485/ (Markdown: https://insights.sbomify.com/CVE-2024-21485/index.md)
```

## Sources

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

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