# CVE-2021-29489: Highcharts options structure cross-site scripting

Source: https://junglewise.ai/threats/cve-2021-29489-highcharts-options-structure-cross-site-scripting  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-05-06. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2021-29489 · Severity: low · CVSS 3.1 · Published 2021-05-06

Highcharts is a JavaScript charting library used to render interactive graphs and charts in web applications. Versions 8 and earlier do not filter the chart options structure for malicious code, allowing attackers to inject and execute JavaScript in end users' browsers if the application passes untrusted configuration data to the library. This can lead to credential theft, session hijacking, or malware distribution.

Technologies: [highcharts (npm)](https://junglewise.ai/threats/technologies/highcharts). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2021-29489 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-29489 being exploited in the wild.

**How severe is CVE-2021-29489?** Low severity, with a CVSS score of 3.1, published 6 May 2021.

**Which products and versions are affected?** highcharts (npm) SEMVER:introduced=0,fixed=9.0.0.

**Is there a fix for CVE-2021-29489?** Yes. highcharts (npm): upgrade to 9.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-29489 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2021-29489?** Check whether you run highcharts (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- highcharts (npm): upgrade to 9.0.0 or later

  ```sh
  npm install highcharts@9.0.0
  ```


## Technical details

This is a cross-site scripting (XSS) vulnerability (CWE-79) in Highcharts' options parsing and rendering layer. Affected versions (8 and earlier) directly insert HTML from the options structure into the DOM without sanitization, particularly when the useHTML flag is enabled. Even with useHTML disabled, attackers can bypass filtering using character replacement tricks or malformed HTML. The attack requires that untrusted configuration data be passed directly to Highcharts; charts configured from static or pre-filtered sources are unaffected. Version 9 fixes the issue by refactoring the rendering layer to use a DOMParser, AST, and HTML allowlisting. Workarounds include recursively applying DOMPurify to the options structure before passing it to Highcharts.

## Affected products

- Highcharts Highcharts 8 and earlier

## Identifiers

- CVE-2021-29489
- GHSA-8j65-4pcq-xq95

## Timeline

- 2021-05-06: disclosed
- 2021-05-06: patched: Fixed in version 9.0.0

## References

- [https://github.com/highcharts/highcharts/security/advisories/GHSA-8j65-4pcq-xq95](https://github.com/highcharts/highcharts/security/advisories/GHSA-8j65-4pcq-xq95)

## Related threats

- [Highcharts JavaScript library cross-site scripting in credits link](https://junglewise.ai/threats/cve-2026-118251-highcharts-js-is-a-javascript-charting-library-based-on-svg)
- [Highcharts JS prototype pollution via dotted series keys](https://junglewise.ai/threats/cve-2026-118250-highcharts-js-is-a-javascript-charting-library-based-on-svg-from)
- [Highcharts JS prototype pollution in series data](https://junglewise.ai/threats/cve-2026-118249-highcharts-js-is-a-javascript-charting-library-based-on-svg-from)
- [Highcharts JavaScript event handler injection via breadcrumbs](https://junglewise.ai/threats/cve-2026-118246-highcharts-js-is-a-javascript-charting-library-based-on-svg-from)
- [Highcharts JS cross-site scripting via innerHTML fallback on print](https://junglewise.ai/threats/cve-2026-118244-highcharts-js-is-a-javascript-charting-library-based-on-svg-from)
