Advisories for Npm/Bootstrap package

2026

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

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 …

Bootstrap: Datepicker data API turns a sanitizer-preserved `data-bs-vcp-options` attribute into executable calendar HTML

Bootstrap's new Datepicker plugin (Bootstrap 6) is documented to take any Vanilla Calendar Pro setting through the data attribute data-bs-vcp-options, holding a JSON object. Bootstrap's data API JSON-decodes that attribute, and the Datepicker spreads the decoded object straight into Vanilla Calendar Pro, which renders its layouts option with innerHTML under an identity default sanitizer. Bootstrap's own security model promises that content is sanitized unless the integrator disables or modifies that …

2025
2024

Bootstrap Cross-Site Scripting (XSS) vulnerability for data-* attributes

A security vulnerability has been discovered in bootstrap that could enable Cross-Site Scripting (XSS) attacks. The vulnerability is associated with the data-loading-text attribute within the button plugin. This vulnerability can be exploited by injecting malicious JavaScript code into the attribute, which would then be executed when the button's loading state is triggered.

2019

Bootstrap Vulnerable to Cross-Site Scripting

Versions of bootstrap prior to 3.4.1 for 3.x and 4.3.1 for 4.x are vulnerable to Cross-Site Scripting (XSS). The data-template attribute of the tooltip and popover plugins lacks input sanitization and may allow attacker to execute arbitrary JavaScript.

2018