CVE-2024-6531
Medium · 6.4CVSS
6.4
EPSS
—
Published
Jul 11, 2024
CISA due date
—
Cloudanix analysis
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
- Identify or create a web page that includes the vulnerable Bootstrap carousel markup
- Craft an anchor element whose href contains a javascript: URI and is referenced by data-slide or data-slide-to
- Host or inject the malicious content and lure a victim to the page
- 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
- CVE-2024-6484 A vulnerability has been identified in Bootstrap that exposes users to Cross-Site… Also affects org.webjars.npm:bootstrap
- CVE-2025-1647 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site… Also affects bootstrap
- CVE-2024-6485 A security vulnerability has been discovered in bootstrap that could enable Cross-Site… Also affects bootstrap
- CVE-2026-96379 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96382 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96368 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96361 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96362 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79