Intel

AIKIDO-2026-10335

bootstrap5-toggle is vulnerable to Cross-site Scripting (XSS)

Cross-site Scripting (XSS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Mar 10, 2026

44

Medium Risk

This Affects:

jsbootstrap5-toggle
5.0.0 - 5.2.0
Fixed in 5.3.0
Are you affected? Scan for Free

TL;DR

Affected versions of bootstrap5-toggle are vulnerable to cross-site scripting (xss) due to insufficient sanitization of HTML used in toggle labels. The component allows HTML content to be provided for the on/off labels, which was previously inserted into the DOM without proper filtering. An attacker who can control these label values could inject malicious HTML or JavaScript that executes in the context of the application. The issue is addressed by introducing HTML sanitization with an allow-list, ensuring that only safe markup is rendered in toggle labels.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

bootstrap5-toggle is vulnerable to Cross-site Scripting (XSS) in versions 5.0.0 - 5.2.0.

How to fix this

Upgrade the bootstrap5-toggle library to the patch version.