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 …