CVE-2024-6485:
Bootstrap Cross-Site Scripting (XSS) vulnerability for data-* attributes
6.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.15268%
CWE
Published
7/11/2024
Updated
11/18/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
bootstrap | npm | >= 1.4.0, < 3.4.1 | 3.4.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how Bootstrap's button plugin handles data-*-text attributes during state changes. The Button.prototype.setState
function is responsible for updating button text when entering loading state, using jQuery.html()
method with raw attribute values. This bypasses input sanitization as evidenced by the PoC where user-controlled input from data attributes gets executed as HTML. The first patched version (3.4.1) likely introduced sanitization in this state transition logic.