CVE-2021-29489: Cross-site Scripting Vulnerability in highcharts

highcharts Updated 02 Oct 2025

Summary

06/05/2021
Yes i
High
7.6

CVE-2021-29489: Options structure open to Cross-site Scripting if passed unfiltered. Affects highcharts versions < 9.0.0. Fixed in 9.0.0. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Highcharts is a popular JavaScript charting library used for creating interactive and visually appealing charts on web pages. It provides a wide range of chart types and customization options, making it a versatile tool for data visualization. However, versions 8 and earlier of Highcharts were found to be vulnerable to a Cross-site Scripting (XSS) attack. This vulnerability allowed untrusted sources to inject malicious code into the end user's browser, potentially leading to unauthorized access or data theft.

Vulnerability Detail

The vulnerability in Highcharts versions 8 and earlier stemmed from the lack of systematic filtering of the chart options structure for XSS vectors. When the 'useHTML' flag was enabled, HTML string options were inserted into the DOM without proper filtering, allowing malicious code execution. Even when 'useHTML' was disabled, attackers could exploit character replacement tricks or malformed HTML to insert malicious code. The impact of this vulnerability could be severe, as it allowed attackers to execute arbitrary code in the context of the user's browser.

How To Fix

Latest published version: 13.1.1 as of 23 Oct 2026

npm install highcharts@13.1.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

9.0.0

This is the first release that contains the fix.

npm install highcharts@9.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to version 9 is not feasible, implementers can apply the DOMPurify library recursively to the options structure to filter out malicious markup. DOMPurify is a widely-used library for sanitizing HTML and preventing XSS attacks. Here is an example of how to use DOMPurify with Highcharts options structure: [code snippet]

Conclusion

The Cross-site Scripting vulnerability in Highcharts versions 8 and earlier posed a significant risk to web applications using this library for charting. However, the Highcharts team addressed this issue in version 9 by implementing robust filtering mechanisms and fixing prototype pollution. Users are strongly advised to upgrade to the latest version to ensure the security of their applications. If upgrading is not possible, applying the DOMPurify library can serve as a temporary workaround. For further support and assistance in vulnerability remediation, please contact security@highcharts.com.

See every vulnerability recorded for highcharts →

Share this vulnerability

FAQ

The vulnerability allowed untrusted sources to execute arbitrary code in the user's browser, potentially leading to unauthorized access or data theft.

To fix this vulnerability, upgrade to Highcharts version 9 or later. Alternatively, you can apply the DOMPurify library to filter out malicious markup.

If your chart configuration comes from a trusted source or is pre-filtered, you are not affected by this vulnerability.

Implementers who cannot upgrade to version 9 can use the DOMPurify library to filter out malicious markup as a workaround.

You can find more information about Highcharts security on their website and by contacting their support team.

Related vulnerabilities

Recent vulnerabilities recorded for highcharts.

How To Fix

Latest published version: 13.1.1 as of 23 Oct 2026

npm install highcharts@13.1.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

9.0.0

This is the first release that contains the fix.

npm install highcharts@9.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback