CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2024-6485

CVE-2024-6485: Cross-Site Scripting (XSS) in Bootstrap 3 Button Plugin

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 20, 2026·6 min read·86 visits

Executive Summary (TL;DR)

Bootstrap 3.x fails to sanitize the data-loading-text attribute in its Button plugin. Injecting malicious HTML into this attribute leads to arbitrary JavaScript execution when the loading state is programmatically triggered.

A cross-site scripting (XSS) vulnerability exists in the Bootstrap 3.x Button plugin. The flaw occurs due to improper sanitization of the data-loading-text attribute, allowing arbitrary JavaScript execution when the button's loading state is triggered via the JavaScript API.

Vulnerability Overview

The vulnerability affects the End-of-Life (EOL) Bootstrap 3.x branch, specifically within the Button plugin (js/button.js). This component provides a mechanism to visually indicate state changes during asynchronous operations, utilizing HTML data attributes like data-loading-text to swap button content temporarily.

The core issue is classified as CWE-79: Improper Neutralization of Input During Web Page Generation. The plugin retrieves the value of the data-loading-text attribute and reflects it directly into the Document Object Model (DOM) without prior sanitization or context-aware encoding.

Exploitation requires specific preconditions within the host application. An attacker must find an injection vector where user-controlled input is dynamically rendered into the data-loading-text attribute by the server-side template or client-side framework. If this condition is met, the XSS payload is staged and awaits the trigger event.

Root Cause Analysis

The flaw resides within the Button.prototype.setState function of the Bootstrap 3 JavaScript library. This method is responsible for managing the visual transitions of button elements, intercepting API calls like .button('loading') to modify the element's inner content.

Within this function, a ternary operator evaluates the node type of the target element. If the element is an <input> tag, the script assigns the variable val to the string 'val'. For all other elements, including standard <button> tags, it assigns val to 'html'.

This logic dictates the jQuery method used to inject the new text. When processing a <button>, the plugin blindly passes the contents retrieved from the data-loading-text attribute directly into jQuery's .html() function.

The .html() method parses the provided string as raw HTML before appending it to the DOM. This automatic parsing mechanism executes any embedded JavaScript contained within specific HTML tags, such as <img> tags utilizing the onerror event handler, establishing the cross-site scripting primitive.

Code Analysis

The vulnerable implementation in Bootstrap v3.4.1 demonstrates the unsafe DOM manipulation. The vulnerability is introduced by the dynamic method selection based on the element type.

  Button.prototype.setState = function (state) {
    var d    = 'disabled'
    var $el  = this.$element
    var val  = $el.is('input') ? 'val' : 'html' // Vulnerable assignment
    var data = $el.data()
 
    state += 'Text'
 
    if (data.resetText == null) $el.data('resetText', $el[val]())
 
    // push to event loop to allow forms to submit
    setTimeout($.proxy(function () {
      // Execution point: resolves to $el.html(data['loadingText'])
      $el[val](data[state] == null ? this.options[state] : data[state]) 
 
      if (state == 'loadingText') {
        this.isLoading = true
        $el.addClass(d).attr(d, d).prop(d, true)
      }
    }, this), 0)
  }

The asynchronous nature of the setTimeout block ensures that the DOM updates do not block the main thread during form submissions. However, it guarantees the execution of the injected payload exactly when the application invokes the loading state.

To manually remediate this logic in legacy systems, the assignment variable val must be altered to use jQuery's .text() method instead of .html(). This change ensures that the browser interprets the attribute contents strictly as a text node, completely neutralizing any executable HTML tags.

  // Patched Assignment
  var val  = $el.is('input') ? 'val' : 'text'

Implementing this single-line patch effectively closes the vulnerability at this specific sink. All special characters within the payload, including angle brackets and quotes, will be safely HTML-entity encoded by the browser prior to rendering.

Exploitation Methodology

The attack sequence mandates that an attacker successfully injects a malicious payload into the targeted HTML attribute. The host application must utilize a templating engine that reflects unsanitized user input into the data-loading-text property of a Bootstrap button.

The following HTML and JavaScript snippet demonstrates the proof-of-concept necessary to trigger the vulnerability. Modern browsers typically restrict direct execution of <script> tags inserted via .html(), necessitating the use of image-based payloads utilizing the onerror event handler.

<!-- Staged Payload in DOM -->
<button id="vulnerableButton" 
        class="btn btn-primary" 
        data-loading-text="<img src=x onerror=alert('CVE-2024-6485')>">
    Submit Data
</button>
 
<script>
  // Application logic triggering the payload
  $('#vulnerableButton').on('click', function () {
    $(this).button('loading'); 
  });
</script>

The injected code remains dormant in the DOM upon initial page load. Exploitation strictly requires the application to programmatically update the button state. This typically occurs automatically as a side effect of user interaction, such as clicking the button to submit a form or initiate an AJAX request.

Impact Assessment

Successful exploitation grants the attacker arbitrary JavaScript execution within the security context of the victim's session. The injected script operates with the same permissions as the legitimate application, bypassing Same-Origin Policy (SOP) restrictions.

This execution capability enables severe downstream consequences. Attackers can exfiltrate sensitive session tokens, access local storage data, intercept subsequent user input, or perform authenticated actions on behalf of the compromised user via Cross-Site Request Forgery (CSRF) tokens captured from the DOM.

The CVSS v3.1 base score is calculated at 6.4 (Medium). This severity rating is constrained primarily by the High Attack Complexity (AC:H) requirement. The vulnerability is not a default configuration flaw; it demands a specific, vulnerable implementation pattern by the developers of the host application to become exploitable.

The Exploit Prediction Scoring System (EPSS) rating sits at 0.00135, placing it in the 33rd percentile. This low probability indicates that broad, automated exploitation is highly unlikely. Threat actors must manually map the application surface to identify viable injection points that map directly to this specific Bootstrap data attribute.

Remediation Guidance

The primary and most secure remediation strategy is migrating the application to an actively supported version of the framework, such as Bootstrap 4.x or 5.x. The button state functionality was formally deprecated in Bootstrap v3.3.5 and completely eliminated in v4, structurally removing the vulnerable code path.

For organizations operating legacy systems where upgrading the major framework version is architecturally prohibitive, commercial support options are available. The HeroDevs Never-Ending Support (NES) program provides backported security patches for EOL Bootstrap 3.x deployments, mitigating this issue without requiring systemic application rewrites.

Alternatively, engineering teams can apply a manual hotfix directly to the js/button.js file. By altering the ternary operator to utilize .text() instead of .html() for non-input elements, the application forces safe text rendering. If dynamic HTML within button states is an absolute requirement, all user-supplied data must be routed through a robust HTML sanitizer, such as DOMPurify, prior to DOM insertion.

Technical Appendix

CVSS Score
6.4/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:L
EPSS Probability
0.14%
Top 67% most exploited

Affected Systems

Bootstrap 1.4.0 <= 3.4.1bootstrap-sass 2.3.2 <= 3.4.3

Affected Versions Detail

Product
Affected Versions
Fixed Version
Bootstrap
Bootstrap
1.4.0 <= 3.4.1-
bootstrap-sass
Bootstrap-sass
2.3.2 <= 3.4.3-
AttributeDetail
Vulnerability TypeCross-Site Scripting (XSS)
CWE IDCWE-79
CVSS v3.1 Base Score6.4
Attack VectorNetwork
Attack ComplexityHigh
EPSS Score0.00135
Exploit StatusProof of Concept
CISA KEVNo

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Cross-site Scripting

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Vulnerability Timeline

Vulnerability published and CVE assigned
2024-07-11
HeroDevs announced availability of patches for NES customers
2024-07-11
Debian LTS advisory (DLA-3810-1) released
2025-04-16

References & Sources

  • [1]HeroDevs Vulnerability Directory - CVE-2024-6485
  • [2]NVD Record - CVE-2024-6485
  • [3]Debian LTS Announce (DLA-3810-1)
  • [4]GitHub Advisory - GHSA-vxmc-5x29-h64v
  • [5]Bootstrap 3.4.1 Source Code - js/button.js

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 3 hours ago•CVE-2026-48861
2.1

CVE-2026-48861: HTTP Request Splitting and Smuggling via Method Parameter CRLF Injection in Elixir Mint

CVE-2026-48861 is a client-side HTTP request-line CRLF (Carriage Return Line Feed) injection vulnerability in the popular Elixir HTTP client library, Mint. The vulnerability permits HTTP Request Splitting and HTTP Request Smuggling when an application forwards untrusted, attacker-controlled inputs to Mint's HTTP client requests as either the HTTP request method or target. By embedding CRLF characters within these parameters, an attacker can terminate the request line prematurely, inject malicious headers, or pipeline entirely independent requests. These smuggled requests are then processed by upstream or downstream proxy servers as separate HTTP queries on the same TCP connection. While Mint version 1.7.0 introduced target validation to secure the request target, the HTTP request method parameter remained completely unvalidated. This flaw allows attackers to bypass routing filters, access restricted internal APIs, or poison HTTP caches under default configurations.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 4 hours ago•CVE-2026-49753
6.3

CVE-2026-49753: HTTP Request/Response Smuggling via Inconsistent Content-Length Parsing in Elixir Mint Client

An Inconsistent Interpretation of HTTP Requests (HTTP Request/Response Smuggling) vulnerability in the Elixir Mint HTTP client allows attacker-controlled HTTP/1 servers to desynchronize response framing on shared connections due to over-lenient parsing of sign-prefixed Content-Length headers.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 4 hours ago•CVE-2026-49754
8.2

CVE-2026-49754: Denial of Service via Unbounded HTTP/2 CONTINUATION Frame Accumulation in Elixir Mint

An allocation of resources without limits or throttling vulnerability in Elixir Mint allows an attacker-controlled HTTP/2 server to exhaust memory in a Mint client. The vulnerability is exploited by sending a HEADERS frame without the END_HEADERS flag followed by an infinite stream of CONTINUATION frames. Because the client lacks limits on the incoming header-block accumulator, the client continuously consumes memory until an out-of-memory crash occurs.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 5 hours ago•CVE-2026-48596
2.1

CVE-2026-48596: Improper Neutralization of CRLF Sequences in Elixir Tesla Multipart HTTP Client

CVE-2026-48596 is an Improper Neutralization of CRLF Sequences in HTTP Headers (HTTP Request/Response Splitting, CWE-113) in the Elixir Tesla HTTP client. The flaw resides in how multipart content-type parameters are joined and serialized, enabling attackers to inject arbitrary headers or split HTTP requests when applications pass untrusted inputs to the parameters of multipart uploads.

Alon Barad
Alon Barad
4 views•6 min read
•about 5 hours ago•CVE-2026-48594
8.2

CVE-2026-48594: Decompression Bomb Denial of Service in Elixir Tesla HTTP Client

An improper handling of highly compressed data (decompression bomb) vulnerability exists in the Elixir Tesla HTTP client when utilizing response decompression middlewares. By serving highly compressed responses or stacked content-encoding headers, a malicious server can cause arbitrary heap exhaustion, leading to a denial of service (DoS) crash in the BEAM virtual machine.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 6 hours ago•CVE-2026-48595
8.2

CVE-2026-48595: Cross-Origin Credential Leakage in Elixir Tesla Client via Case-Sensitive Redirect Filter Bypass

A high-severity security vulnerability in Elixir's Tesla HTTP client library (CVE-2026-48595) allows unauthenticated remote attackers to harvest sensitive credentials, including Authorization headers and cookies. The flaw resides in the 'Tesla.Middleware.FollowRedirects' component, which performs case-sensitive lookups when stripping credentials during cross-origin redirects. Because HTTP headers are case-insensitive by RFC specifications, standard canonical casing (e.g., 'Authorization') bypasses the lowercase-only blocklist, leaking tokens to untrusted external redirect destinations.

Alon Barad
Alon Barad
5 views•5 min read