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.
- 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
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
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 | 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 |
7 more packages
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 include 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.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
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: 1 Nuclei template.
Sources
Also known as GHSA-547x-748v-vp6p, PYSEC-2024-35, PYSEC-2026-219, PYSEC-2026-220.