# CVE-2024-6531: Bootstrap XSS vulnerability in carousel component

Source: https://junglewise.ai/threats/cve-2024-6531-bootstrap-xss-vulnerability-in-carousel-component  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-07-11. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2024-6531 · Severity: low · CVSS 3.1 · Published 2024-07-11

Bootstrap is a popular front-end framework used to build responsive websites and applications. A now-withdrawn advisory claimed the carousel component contained a cross-site scripting (XSS) vulnerability that could allow attackers to inject malicious code into web pages. However, this advisory was retracted because Bootstrap does not sanitize HTML by design—users are responsible for validating input themselves.

Technologies: [org.webjars:bootstrap (Maven)](https://junglewise.ai/threats/technologies/org-webjars-bootstrap), [bootstrap (npm)](https://junglewise.ai/threats/technologies/bootstrap), [twbs/bootstrap (Packagist)](https://junglewise.ai/threats/technologies/twbs-bootstrap). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [npm](https://junglewise.ai/threats/vendors/npm), [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

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

**How severe is CVE-2024-6531?** Low severity, with a CVSS score of 3.1, published 11 July 2024.

**Which products and versions are affected?** org.webjars:bootstrap (Maven) ECOSYSTEM:introduced=4.0.0,fixed=5.0.0; org.webjars.npm:bootstrap (Maven) ECOSYSTEM:introduced=4.0.0,fixed=5.0.0; bootstrap (npm) SEMVER:introduced=4.0.0,fixed=5.0.0; twbs/bootstrap (Packagist) ECOSYSTEM:introduced=4.0.0,fixed=5.0.0.

**Is there a fix for CVE-2024-6531?** Yes. org.webjars:bootstrap (Maven): upgrade to 5.0.0 or later; org.webjars.npm:bootstrap (Maven): upgrade to 5.0.0 or later; bootstrap (npm): upgrade to 5.0.0 or later; twbs/bootstrap (Packagist): upgrade to 5.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2024-6531 attacked?** It is attacked over the network.

**Am I affected by CVE-2024-6531?** Check whether you run org.webjars:bootstrap (Maven), org.webjars.npm:bootstrap (Maven), bootstrap (npm) 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

- org.webjars:bootstrap (Maven): upgrade to 5.0.0 or later

  ```sh
  # set org.webjars:bootstrap to 5.0.0 in your pom.xml or build.gradle
  ```

- org.webjars.npm:bootstrap (Maven): upgrade to 5.0.0 or later

  ```sh
  # set org.webjars.npm:bootstrap to 5.0.0 in your pom.xml or build.gradle
  ```

- bootstrap (npm): upgrade to 5.0.0 or later

  ```sh
  npm install bootstrap@5.0.0
  ```

- twbs/bootstrap (Packagist): upgrade to 5.0.0 or later

  ```sh
  composer require twbs/bootstrap:^5.0.0
  ```


## Technical details

The reported vulnerability (CVE-2024-6531) involved improper handling of the data-slide and data-slide-to attributes in Bootstrap's carousel component, potentially allowing XSS via crafted href attributes in anchor tags. The advisory was withdrawn because Bootstrap's JavaScript library is not designed to sanitize user-supplied HTML content; it is the application developer's responsibility to validate and escape input before rendering. No active exploit is known, and the associated CVE was rescinded.

## Affected products

- Bootstrap Bootstrap 4.0.0 through 4.6.2

## Identifiers

- CVE-2024-6531
- GHSA-vc8w-jr9v-vj7f

## Timeline

- 2024-07-11: disclosed: Advisory published on GitHub and NVD
- 2025-10-09: other: Advisory withdrawn; CVE rescinded as not a security issue in Bootstrap

## References

- [https://github.com/rubysec/ruby-advisory-db/blob/master/gems/bootstrap/CVE-2024-6531.yml](https://github.com/rubysec/ruby-advisory-db/blob/master/gems/bootstrap/CVE-2024-6531.yml)

## Related threats

- [Bootstrap Vulnerable to Cross-Site Scripting in its Popover and Tooltip Components](https://junglewise.ai/threats/cve-2025-1647-bootstrap-cross-site-scripting-in-popover-and-tooltip)
- [Bootstrap XSS vulnerability in carousel component (withdrawn)](https://junglewise.ai/threats/cve-2024-6484-bootstrap-xss-vulnerability-in-carousel-component-withdrawn)
- [Bootstrap Cross-Site Scripting in data-* attributes](https://junglewise.ai/threats/cve-2024-6485-bootstrap-cross-site-scripting-in-data-attributes)
- [Bootstrap XSS in tooltip and popover plugins](https://junglewise.ai/threats/cve-2019-8331-bootstrap-xss-in-tooltip-and-popover-plugins)
- [Bootstrap XSS in tooltip and popover data-template attribute](https://junglewise.ai/threats/bootstrap-xss-in-tooltip-and-popover-data-template-attribute-7ae47d11)
