Cloudanix VulnDB

CVE-2024-6531

Medium · 6.4

CVSS

6.4

EPSS

—

Published

Jul 11, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A problem in the popular Bootstrap web design library lets attackers run harmful code inside visitors' browsers when they click links inside image sliders.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Moderate
Impact
Data Exposure
Component
Library
Class
XSS
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Insufficient sanitization of the href attribute on anchor tags used with data-slide and data-slide-to attributes in the Bootstrap carousel component permits injection and execution of arbitrary JavaScript in the victim's browser context.

Why it matters to the business

Successful exploitation can result in theft of user sessions or credentials, unauthorized actions performed on behalf of users, and erosion of trust in web applications, with elevated urgency for organizations relying on affected Debian-packaged Bootstrap 4 versions until patched.

How an attack unfolds

An attacker crafts a malicious web page or injects content containing a Bootstrap carousel that references an anchor tag whose href attribute contains a javascript: payload via the data-slide or data-slide-to attributes; when a victim interacts with the carousel, the payload executes in the browser.

How to fix it

Upgrade twitter-bootstrap4 to the fixed Debian package versions: 4.6.1+dfsg1-5 on Debian 13, 4.5.2+dfsg1-8~deb11u2 on Debian 11, and 4.6.1+dfsg1-4+deb12u1 on Debian 12; remove or sanitize custom carousel markup using the vulnerable attributes until upgrades are complete.

How to confirm the fix worked

Verify installed package versions match the listed fixed releases, then test carousel elements with sample malicious href attributes containing javascript: to confirm script execution is blocked.

Typical attack path

  1. Identify or create a web page that includes the vulnerable Bootstrap carousel markup
  2. Craft an anchor element whose href contains a javascript: URI and is referenced by data-slide or data-slide-to
  3. Host or inject the malicious content and lure a victim to the page
  4. Victim interaction with the carousel triggers execution of the injected script

How to detect it

Review web application logs and rendered HTML for unexpected javascript: URIs inside carousel anchor tags; inspect browser console or network traffic for unauthorized script execution originating from carousel interactions.

What your security team should do

  • Immediately schedule upgrades to the fixed package versions for all affected Debian systems
  • Audit web applications for custom usage of Bootstrap carousel data-slide and data-slide-to attributes
  • Implement Content-Security-Policy headers as a defense-in-depth measure
  • Monitor for new exploit maturity indicators and reassess within 30 days

The record

A vulnerability has been identified in Bootstrap that exposes users to Cross-Site Scripting (XSS) attacks. The issue is present in the carousel component, where the data-slide and data-slide-to attributes can be exploited through the href attribute of an <a> tag due to inadequate sanitization. This vulnerability could potentially enable attackers to execute arbitrary JavaScript within the victim's browser.

Affected packages

Ecosystem Package Introduced Fixed
Maven org.webjars.npm:bootstrap 4.0.0 No fix
Maven org.webjars.npm:bootstrap 4.0.0 5.0.0
Maven org.webjars:bootstrap 4.0.0 No fix
Maven org.webjars:bootstrap 4.0.0 5.0.0
NuGet bootstrap 4.0.0 No fix
NuGet bootstrap 4.0.0 5.0.0
NuGet bootstrap.sass 4.0.0 No fix
NuGet bootstrap.sass 4.0.0 5.0.0
Packagist twbs/bootstrap 4.0.0 No fix
Packagist twbs/bootstrap 4.0.0 5.0.0
RubyGems bootstrap 4.0.0 No fix
RubyGems bootstrap 4.0.0 5.0.0
npm bootstrap 4.0.0 5.0.0
npm bootstrap 4.0.0 No fix
Debian:11 twitter-bootstrap4 0 No fix
Debian:11 twitter-bootstrap4 0 4.5.2+dfsg1-8~deb11u2
Debian:12 twitter-bootstrap4 0 No fix
Debian:12 twitter-bootstrap4 0 4.6.1+dfsg1-4+deb12u1
Debian:13 twitter-bootstrap4 0 No fix
Debian:13 twitter-bootstrap4 0 4.6.1+dfsg1-5
Ubuntu:20.04:LTS twitter-bootstrap3 0 No fix
Ubuntu:20.04:LTS twitter-bootstrap4 0 No fix
Ubuntu:22.04:LTS twitter-bootstrap3 0 No fix
Ubuntu:22.04:LTS twitter-bootstrap4 0 No fix
Ubuntu:24.04:LTS twitter-bootstrap3 0 No fix
Ubuntu:24.04:LTS twitter-bootstrap4 0 No fix
Ubuntu:24.04:LTS twitter-bootstrap4 0 4.6.1+dfsg1-4+deb12u1build0.24.04.1
Ubuntu:24.10 twitter-bootstrap3 0 No fix
Ubuntu:24.10 twitter-bootstrap4 0 No fix
Ubuntu:Pro:16.04:LTS twitter-bootstrap3 0 No fix
Ubuntu:Pro:18.04:LTS twitter-bootstrap3 0 No fix
Ubuntu:Pro:20.04:LTS twitter-bootstrap4 0 4.4.1+dfsg1-2ubuntu0.1~esm1
Ubuntu:Pro:22.04:LTS twitter-bootstrap4 0 4.6.0+dfsg1-4ubuntu0.1~esm1
gem bootstrap 4.0.0 5.0.0
maven org.webjars.npm/bootstrap 4.0.0 5.0.0
maven org.webjars/bootstrap 4.0.0 5.0.0
nuget bootstrap 4.0.0 5.0.0
nuget bootstrap.sass 4.0.0 5.0.0
packagist twbs/bootstrap 4.0.0 5.0.0

Related vulnerabilities