# CVE-2024-6485: XSS in Bootstrap button component

> Attackers can execute arbitrary JavaScript via the data-loading-text attribute in Bootstrap buttons, potentially compromising user sessions.

- **Severity:** Medium 6.4 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 11 Jul 2024
- **Updated:** 3 Nov 2025
- **Also known as:** AZL-105104, AZL-105134, AZL-105158, AZL-105206, AZL-105272, AZL-71317, DEBIAN-CVE-2024-6485, DLA-4124-1, GHSA-vxmc-5x29-h64v, ROOT-APP-NPM-CVE-2024-6485, UBUNTU-CVE-2024-6485

## What is CVE-2024-6485?

CVE-2024-6485 is a medium-severity cross-site scripting vulnerability in Bootstrap, published on 11 Jul 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A security vulnerability has been discovered in bootstrap that could enable Cross-Site Scripting (XSS) attacks. The vulnerability is associated with the data-loading-text attribute within the button plugin. This vulnerability can be exploited by injecting malicious JavaScript code into the attribute, which would then be executed when the button's loading state is triggered.

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

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

2 open source packages ship an affected version, including bootstrap.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bootstrap` | npm | From 1.4.0 to 3.4.1 | None |
| `bootstrap` | npm | From 1.4.0 to 3.4.1 | None |

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

Upgrade to a fixed version.

## Is CVE-2024-6485 being exploited?

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

Public exploit code:

- A poc for Bootstrap XSS(CVE-2024-6485、CVE-2016-10735、CVE-2019-8331、CVE-2018-14040) (github_poc): https://github.com/Yumeae/Bootstrap-with-XSS

## Fix prompt for AI coding agents

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

What it is: CVE-2024-6485 is a medium-severity cross-site scripting vulnerability in Bootstrap, published on 11 Jul 2024. An attacker can exploit it over the internet without logging in, 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-6485 exists.

Affected packages and fixed versions:
- bootstrap (npm): affected from 1.4.0 up to 3.4.1; no fix listed
- bootstrap (npm): affected from 1.4.0 up to 3.4.1; no fix listed

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

## Sources

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

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