Every CVESearch/Get API key

CVE-2026-141468

Bootstrap: the Toggler plugin turns sanitizer-approved `data-*` attributes into an executable inline event handler

Explain with AI
ChatGPTClaudeGoogle AI
Severity
6.1Medium
Network attack, no privileges, needs user interactionCVSS 3.1, CVE List
Exploitation
None reported
1 exploit-related link
Exploit chance
0.60% in 30 days
Percentile50th
EPSS, scored
Listed fix
6.0.0-alpha.2 for bootstrap
From GitHub Advisories and OSV3 other affected packages

Overview

Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first projects on the web. From version 6.0.0-alpha.1 until 6.0.0-alpha.2, the Bootstrap 6 Toggler plugin accepts an attacker-controlled attribute name in data-bs-attribute and value in data-bs-value, which an application may preserve while sanitizing untrusted rich HTML with DOMPurify's default configuration. In js/src/toggler.ts, Toggler._execute() rejects only id and otherwise passes the name and value to setAttribute(), allowing a value such as an inline event handler to become executable after the victim clicks a [data-bs-toggle="toggler"] control. On a page without a Content Security Policy that blocks inline handlers, this can execute JavaScript in the application's origin and permit access to origin data, authenticated same-origin actions, and page modification. Bootstrap 5 is unaffected because it does not contain the Toggler plugin. This issue is fixed in version 6.0.0-alpha.2.

CVSS 3.1 vector

Exploitability

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

Impact

Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Exploit chance over time

Up 0.1 points since Dec 2, 2026
EPSS score, scored every day from Dec 2, 2026 to Dec 4, 2026: lowest 0.52% on Dec 2, 2026, highest 0.60% on Dec 3, 2026, 0.60% on the last day.

Affected

Packages 4

Affected packages
PackageAffectedFixed
bootstrap
npm
6.0.0-alpha.1 up to 6.0.0-alpha.2
6.0.0-alpha.2
bootstrap-html
Ubuntu:24.04:LTS
All versions, plus listed versions
5.3.1+dfsg-1
None listed
bootstrap-html
Ubuntu:26.10
All versions, plus listed versions
5.3.8+dfsg-25.3.8+dfsg-3
None listed
bootstrap-html
Ubuntu:26.04:LTS
All versions, plus listed versions
5.3.5+dfsg-45.3.8+dfsg-15.3.8+dfsg-2
None listed

Products 2

Exploits

Sources link exploit code, tools that only detect the flaw and other work on it, and most don’t say which a link is.

Exploit-related links
LinkSourceDate
googlesky/CVE-2026-141468PoC in GitHub2026-12-02

Sources

CVE List Score usedCVSS 3.16.1

Bootstrap: the Toggler plugin turns sanitizer-approved `data-*` attributes into an executable inline event handler

Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first projects on the web. From version 6.0.0-alpha.1 until 6.0.0-alpha.2, the Bootstrap 6 Toggler plugin accepts an attacker-controlled attribute name in data-bs-attribute and value in data-bs-value, which an application may preserve while sanitizing untrusted rich HTML with DOMPurify's default configuration. In js/src/toggler.ts, Toggler._execute() rejects only id and otherwise passes the name and value to setAttribute(), allowing a value such as an inline event handler to become executable after the victim clicks a [data-bs-toggle="toggler"] control. On a page without a Content Security Policy that blocks inline handlers, this can execute JavaScript in the application's origin and permit access to origin data, authenticated same-origin actions, and page modification. Bootstrap 5 is unaffected because it does not contain the Toggler plugin. This issue is fixed in version 6.0.0-alpha.2.

Record
CVE-2026-141468
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79, CWE-83
Updated
2026-12-02
EUVDEUVD-2026-140534CVSS 3.16.1

Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first projects on the web. From version 6.0.0-alpha.1 until 6.0.0-alpha.2, the Bootstrap 6 Toggler plugin accepts an attacker-controlled attribute name in data-bs-attribute and value in data-bs-value, which an application may preserve while sanitizing untrusted rich HTML with DOMPurify's default configuration. In js/src/toggler.ts, Toggler._execute() rejects only id and otherwise passes the name and value to setAttribute(), allowing a value such as an inline event handler to become executable after the victim clicks a [data-bs-toggle="toggler"] control. On a page without a Content Security Policy that blocks inline handlers, this can execute JavaScript in the application's origin and permit access to origin data, authenticated same-origin actions, and page modification. Bootstrap 5 is unaffected because it does not contain the Toggler plugin. This issue is fixed in version 6.0.0-alpha.2.

Record
EUVD-2026-140534
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-12-02
GitHub AdvisoriesGHSA-pj28-6c95-2682CVSS 3.16.1

Bootstrap: The Toggler plugin turns sanitizer-approved `data-*` attributes into an executable inline event handler

Summary

Bootstrap's new Toggler plugin (Bootstrap 6) rejects only the attribute name id and then calls setAttribute(attribute, value) for any other attribute named by data-bs-attribute, with the value taken from data-bs-value. An application that renders sanitized untrusted HTML keeps data-bs-* attributes, because DOMPurify preserves data-* in its default configuration, so a button carrying data-bs-toggle="toggler" data-bs-attribute="onclick" data-bs-value="<js>" passes the sanitizer with no executable attribute. When a victim clicks that button, the Toggler data API writes the attacker's string into an inline onclick handler, and the browser runs it on the application's own origin.

  • Affected: bootstrap on the Bootstrap 6 line, including the published prerelease 6.0.0-alpha.1 (npm next tag, released 2026-10-08) and the default main branch at e93ba5e. js/src/toggler.ts and the shipped dist/js/bootstrap.bundle.min.js are byte-for-byte identical between the v6.0.0-alpha.1 tag and current main.
  • Not the current stable default: npm install bootstrap installs 5.3.8 (npm latest), which has no Toggler plugin or selector and is unaffected. This was reported before the first stable 6.0 release so the behavior does not ship in it.

Threat Model

Preconditions:

  • An application renders rich HTML from an untrusted user, sanitizes it with DOMPurify in its default configuration (which keeps data-* attributes), and inserts the result into the DOM, for example with innerHTML. This is a common user-generated-content pattern, but it is the integration-specific condition that makes the bug reachable, so it was treated it as non-universal.
  • The page loads the Bootstrap 6 bundle that contains the Toggler plugin (6.0.0-alpha.1 or a build of the current main line).
  • The response has no Content Security Policy that forbids inline event handlers. Bootstrap does not require or set such a CSP by default.
  • A victim clicks the attacker-supplied control. The interaction is one ordinary click on a normal-looking button.

Attack steps:

  • The attacker submits HTML through the application's normal content path: <button data-bs-toggle="toggler" data-bs-attribute="onclick" data-bs-value="<payload>">...</button>.
  • DOMPurify's default sanitize keeps the three data-bs-* attributes and removes nothing else; the stored/rendered element has no onclick and looks inert.
  • A victim views the content and clicks the button; the Toggler data API reads data-bs-attribute/data-bs-value as its configuration and calls setAttribute("onclick", "<payload>").
  • The inline handler now exists and the browser executes the attacker's JavaScript on the application's origin.

Practical impact in an app that renders DOMPurify-sanitized user HTML and loads Bootstrap 6:

  • Arbitrary JavaScript on the application origin as the victim: reading localStorage, sessionStorage and script-accessible cookies, exfiltrating a session token, making authenticated same-origin requests, and modifying the page. Our PoC demonstrates attacker-chosen JavaScript execution (window.pwned = true).

Root Cause

The Toggler data API maps data-bs-attribute and data-bs-value straight into the plugin configuration and calls toggle() on click. toggle() calls _execute(), which rejects only id and then writes any other attribute name with setAttribute(), with no allowlist and no rejection of event-handler or URL-bearing names.

// https://github.com/twbs/bootstrap/blob/e93ba5e5267ac2f74d5d35f1c11bb476957de94b/js/src/toggler.ts#L79-L103
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…
Record
GHSA-pj28-6c95-2682
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79, CWE-83
Updated
2026-12-02
NVDCVSS 3.16.1

Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first projects on the web. From version 6.0.0-alpha.1 until 6.0.0-alpha.2, the Bootstrap 6 Toggler plugin accepts an attacker-controlled attribute name in data-bs-attribute and value in data-bs-value, which an application may preserve while sanitizing untrusted rich HTML with DOMPurify's default configuration. In js/src/toggler.ts, Toggler._execute() rejects only id and otherwise passes the name and value to setAttribute(), allowing a value such as an inline event handler to become executable after the victim clicks a [data-bs-toggle="toggler"] control. On a page without a Content Security Policy that blocks inline handlers, this can execute JavaScript in the application's origin and permit access to origin data, authenticated same-origin actions, and page modification. Bootstrap 5 is unaffected because it does not contain the Toggler plugin. This issue is fixed in version 6.0.0-alpha.2.

Record
CVE-2026-141468
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79, CWE-83
Updated
2026-12-02
OSVCVSS 3.16.1

Bootstrap: the Toggler plugin turns sanitizer-approved `data-*` attributes into an executable inline event handler

Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first projects on the web. From version 6.0.0-alpha.1 until 6.0.0-alpha.2, the Bootstrap 6 Toggler plugin accepts an attacker-controlled attribute name in data-bs-attribute and value in data-bs-value, which an application may preserve while sanitizing untrusted rich HTML with DOMPurify's default configuration. In js/src/toggler.ts, Toggler._execute() rejects only id and otherwise passes the name and value to setAttribute(), allowing a value such as an inline event handler to become executable after the victim clicks a [data-bs-toggle="toggler"] control. On a page without a Content Security Policy that blocks inline handlers, this can execute JavaScript in the application's origin and permit access to origin data, authenticated same-origin actions, and page modification. Bootstrap 5 is unaffected because it does not contain the Toggler plugin. This issue is fixed in version 6.0.0-alpha.2.

Record
CVE-2026-141468
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79, CWE-83
Updated
2026-12-02
OSVGHSA-pj28-6c95-2682CVSS 3.16.1

Bootstrap: The Toggler plugin turns sanitizer-approved `data-*` attributes into an executable inline event handler

Summary

Bootstrap's new Toggler plugin (Bootstrap 6) rejects only the attribute name id and then calls setAttribute(attribute, value) for any other attribute named by data-bs-attribute, with the value taken from data-bs-value. An application that renders sanitized untrusted HTML keeps data-bs-* attributes, because DOMPurify preserves data-* in its default configuration, so a button carrying data-bs-toggle="toggler" data-bs-attribute="onclick" data-bs-value="<js>" passes the sanitizer with no executable attribute. When a victim clicks that button, the Toggler data API writes the attacker's string into an inline onclick handler, and the browser runs it on the application's own origin.

  • Affected: bootstrap on the Bootstrap 6 line, including the published prerelease 6.0.0-alpha.1 (npm next tag, released 2026-10-08) and the default main branch at e93ba5e. js/src/toggler.ts and the shipped dist/js/bootstrap.bundle.min.js are byte-for-byte identical between the v6.0.0-alpha.1 tag and current main.
  • Not the current stable default: npm install bootstrap installs 5.3.8 (npm latest), which has no Toggler plugin or selector and is unaffected. This was reported before the first stable 6.0 release so the behavior does not ship in it.

Threat Model

Preconditions:

  • An application renders rich HTML from an untrusted user, sanitizes it with DOMPurify in its default configuration (which keeps data-* attributes), and inserts the result into the DOM, for example with innerHTML. This is a common user-generated-content pattern, but it is the integration-specific condition that makes the bug reachable, so it was treated it as non-universal.
  • The page loads the Bootstrap 6 bundle that contains the Toggler plugin (6.0.0-alpha.1 or a build of the current main line).
  • The response has no Content Security Policy that forbids inline event handlers. Bootstrap does not require or set such a CSP by default.
  • A victim clicks the attacker-supplied control. The interaction is one ordinary click on a normal-looking button.

Attack steps:

  • The attacker submits HTML through the application's normal content path: <button data-bs-toggle="toggler" data-bs-attribute="onclick" data-bs-value="<payload>">...</button>.
  • DOMPurify's default sanitize keeps the three data-bs-* attributes and removes nothing else; the stored/rendered element has no onclick and looks inert.
  • A victim views the content and clicks the button; the Toggler data API reads data-bs-attribute/data-bs-value as its configuration and calls setAttribute("onclick", "<payload>").
  • The inline handler now exists and the browser executes the attacker's JavaScript on the application's origin.

Practical impact in an app that renders DOMPurify-sanitized user HTML and loads Bootstrap 6:

  • Arbitrary JavaScript on the application origin as the victim: reading localStorage, sessionStorage and script-accessible cookies, exfiltrating a session token, making authenticated same-origin requests, and modifying the page. Our PoC demonstrates attacker-chosen JavaScript execution (window.pwned = true).

Root Cause

The Toggler data API maps data-bs-attribute and data-bs-value straight into the plugin configuration and calls toggle() on click. toggle() calls _execute(), which rejects only id and then writes any other attribute name with setAttribute(), with no allowlist and no rejection of event-handler or URL-bearing names.

// https://github.com/twbs/bootstrap/blob/e93ba5e5267ac2f74d5d35f1c11bb476957de94b/js/src/toggler.ts#L79-L103
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…
Record
GHSA-pj28-6c95-2682
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79, CWE-83
Updated
2026-12-02
OSVUBUNTU-CVE-2026-141468No score

(Bootstrap is the most popular HTML, CSS, and JavaScript framework for ...)

Record
UBUNTU-CVE-2026-141468
Updated
2026-12-03

The JSON record also has the rest of 2 source descriptions.

History

Recorded by Every CVE

Changes recorded by Every CVE
DayChangedSources
Affected packages, other IDs, referencesOSV
Exploit links, key factsOSV, PoC in GitHub
Published dateCVE List, EUVD, NVD
Published dateEUVD
Affected packages, referencesOSV
Affected packages, key facts, referencesGitHub Advisories
Other IDs, referencesNVD, OSV
Other IDs, products, published dateEUVD
First indexedCVE List

Upstream dates may differ.

References

MoveEnter Open