Bootstrap: Datepicker data API turns a sanitizer-preserved `data-bs-vcp-options` attribute into executable calendar HTML
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| twbsbootstrap | — | Not listed |
| npmbootstrap |
≥ 6.0.0-alpha.1, < 6.0.0-alpha.2→ 6.0.0-alpha.2 |
6.0.0-alpha.2 |
Original description The description as published by the source.
Summary
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 sanitization, and scopes out only "vulnerabilities caused solely by disabling or modifying content sanitization".
This report disables and modifies nothing: an application that renders untrusted HTML through default DOMPurify keeps the inert data-bs-* attributes (DOMPurify preserves data-* by default), so a single input carrying data-bs-toggle="datepicker" and a JSON layouts.default passes the sanitizer with no executable attribute, and the browser runs the attacker's script the moment a victim focuses that input.
- Affected:
bootstrapon the Bootstrap 6 line, including the published prerelease6.0.0-alpha.1(npmnexttag, released 2026-10-08) and the defaultmainbranch at3b7f323. The Bootstrap 6 bundle ships Vanilla Calendar Pro (peervanilla-calendar-pro@^3.4.0, resolved to3.4.0). - Not…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web gist.github.com
- web github.com
- web github.com