CVE-2026-1513: billboard.js XSS Vulnerability During Chart Option Binding
Summary
CVE-2026-1513: billboard.js is vulnerable to XSS during chart option binding. Affects billboard.js versions < 3.18.0. Fixed in 3.18.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
billboard.js is a popular JavaScript library for creating interactive and customizable charts. It provides a wide range of chart types and is built on top of D3.js, making it powerful yet easy to use. However, prior to version 3.18.0, billboard.js had a vulnerability that allowed for cross-site scripting (XSS) attacks due to improper sanitization of user inputs during chart option binding.
Vulnerability Detail
The vulnerability in billboard.js arises from its failure to properly sanitize inputs when binding chart options. This oversight allows attackers to inject malicious JavaScript code, which can be executed in the context of the user's browser. The ramifications of this vulnerability are significant, as it can lead to unauthorized actions being performed on behalf of the user, data theft, or even complete takeover of the user's session. The vulnerability is classified under CWE-79, which pertains to improper neutralization of input during web page generation.
How To Fix
Latest published version: 4.1.3 as of 23 Oct 2026
npm install billboard.js@4.1.3
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
3.18.0
This is the first release that contains the fix.
npm install billboard.js@3.18.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If you are unable to update the package immediately, consider implementing input validation and sanitization on your own before passing any user-generated data to billboard.js. This can help mitigate the risk of XSS attacks until you can upgrade to the patched version.
Conclusion
In summary, the XSS vulnerability in billboard.js prior to version 3.18.0 poses a significant risk to applications using this library. It is crucial to update to the latest version to safeguard against potential attacks. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.
See every vulnerability recorded for billboard.js →
FAQ
The CVSS score of this vulnerability is 7.1, indicating a high severity level.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The potential consequences include unauthorized actions, data theft, and session hijacking, which can severely compromise user security.
Yes, you should upgrade to billboard.js version 3.18.0 or later to mitigate this vulnerability.
Vulert is a service that monitors and alerts for open-source vulnerabilities in your software using just the package-lock.json file. It provides real-time alerts to help you maintain security.
References
Related vulnerabilities
Recent vulnerabilities recorded for billboard.js.