CVE-2026-141468
Bootstrap: the Toggler plugin turns sanitizer- approved `data- *` attributes into an executable inline event handler
- Severity
- 6.1MediumNetwork attack, no privileges, needs user interactionCVSS 3.1, CVE List
- Exploitation
- None reported
- Exploit chance
- 0.60% in 30 daysPercentile50thEPSS, scored
- Listed fix
6.0.0-alpha.2for bootstrapFrom 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:NExploit chance over time
Affected
Packages 4
| Package | Affected | Fixed |
|---|---|---|
bootstrapnpm | 6.0.0-alpha.1 up to 6.0.0-alpha.2 | 6.0.0-alpha.2 |
bootstrap-htmlUbuntu:24.04:LTS | All versions, plus listed versions 5.3.1+dfsg-1 | None listed |
bootstrap-htmlUbuntu:26.10 | All versions, plus listed versions 5.3.8+dfsg-25.3.8+dfsg-3 | None listed |
bootstrap-htmlUbuntu: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.
| Link | Source | Date |
|---|---|---|
| googlesky/CVE-2026-141468 | PoC in GitHub | 2026-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 Medium
CVSS: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 Medium
CVSS: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:
bootstrapon the Bootstrap 6 line, including the published prerelease6.0.0-alpha.1(npmnexttag, released 2026-10-08) and the defaultmainbranch ate93ba5e.js/src/toggler.tsand the shippeddist/js/bootstrap.bundle.min.jsare byte-for-byte identical between thev6.0.0-alpha.1tag and currentmain. - Not the current stable default:
npm install bootstrapinstalls5.3.8(npmlatest), 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 withinnerHTML. 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.1or a build of the currentmainline). - 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 noonclickand looks inert. - A victim views the content and clicks the button; the Toggler data API reads
data-bs-attribute/data-bs-valueas its configuration and callssetAttribute("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,sessionStorageand 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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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:
bootstrapon the Bootstrap 6 line, including the published prerelease6.0.0-alpha.1(npmnexttag, released 2026-10-08) and the defaultmainbranch ate93ba5e.js/src/toggler.tsand the shippeddist/js/bootstrap.bundle.min.jsare byte-for-byte identical between thev6.0.0-alpha.1tag and currentmain. - Not the current stable default:
npm install bootstrapinstalls5.3.8(npmlatest), 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 withinnerHTML. 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.1or a build of the currentmainline). - 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 noonclickand looks inert. - A victim views the content and clicks the button; the Toggler data API reads
data-bs-attribute/data-bs-valueas its configuration and callssetAttribute("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,sessionStorageand 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 Medium
CVSS: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
| Day | Changed | Sources |
|---|---|---|
| Affected packages, other IDs, references | OSV | |
| Exploit links, key facts | OSV, PoC in GitHub | |
| Published date | CVE List, EUVD, NVD | |
| Published date | EUVD | |
| Affected packages, references | OSV | |
| Affected packages, key facts, references | GitHub Advisories | |
| Other IDs, references | NVD, OSV | |
| Other IDs, products, published date | EUVD | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/twbs/bootstrap/security/advisories/GHSA-pj28-6c95-2682
github.com/twbs/bootstrap/commit/9598cdc049926a161de7401d4ac05e091e6ed80d
gist.github.com/superboy-zjc/a5fee7d574d970728defaa7aa21aa19b
github.com/twbs/bootstrap/releases/tag/v6.0.0-alpha.2
nvd.nist.gov/vuln/detail/CVE-2026-141468
github.com/advisories/GHSA-pj28-6c95-2682
github.com/CVEProject/cvelistV5/tree/main/cves/2026/141xxx/CVE-2026-141468.json
github.com/twbs/bootstrap
ubuntu.com/security/CVE-2026-141468
cve.org/CVERecord?id=CVE-2026-141468