Highcharts: `javascript:` URL in credits.href runs script on click
Impact
A credits.href value beginning with javascript: is assigned to the window location when the credits label is clicked, without being checked against an allowed-scheme list. An attacker who controls the chart configuration can therefore run script in the origin of the page hosting the chart. Exploitation requires that untrusted data reach the chart configuration and that a user click the credits label. Charts built with Highcharts Stock, Maps and Gantt are included, since those ship from the same package as Core.
Workarounds
A drop-in fix is available for any affected versions (5.0.0-13.0.2). Add the below IIFE to run after Highcharts is loaded, but before a chart is created:
!function(t){if(t&&t.Chart&&!t.Chart.prototype.creditsHrefPatched){var r=t.Chart.prototype,e=r.addCredits;r.addCredits=function(n){var o=t.merge(!0,this.options.credits,n);return o&&o.href&&!c(o.href)&&delete o.href,e.call(this,o)},r.creditsHrefPatched=!0}function c(r){var e=t.AST&&t.AST.allowedReferences||["https://","http://","mailto:","/","../","./","#"];return"string"==typeof r&&e.some(function(t){return 0===r.indexOf(t)})}}(Highcharts);
What to do
Obtaining the patched version
Upgrade the affected package to a fixed version (11.4.9, 12.6.1, 13.1.0, or later). Patched releases are available through all standard distribution channels.
- npm: Upgrade the package to a patched version, for example
npm install highcharts@ 13.1.0. - CDN: Use versioned URLs on code.highcharts.com, for example
https://code.highcharts.com/13.1.0/highcharts.js.
For further details on each installation method, see the installation guide..
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | highcharts | < 11.4.9, >= 12.0.0, < 12.6.1, >= 13.0.0, < 13.1.0 | 11.4.9, 12.6.1, 13.1.0 |
References
- https://github.com/highcharts/highcharts/security/advisories/GHSA-5793-x2q3-c3q7
- https://github.com/highcharts/highcharts/pull/25315
- https://github.com/highcharts/highcharts/commit/9534773d0f41400aac0945bf8aaebc38dfc72aff
- https://github.com/highcharts/highcharts
- https://github.com/highcharts/highcharts/releases/tag/v13.1.0
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N- Weakness (CWE)
CWE-79- Platform
- npm
- Package
highcharts- Disclosed
- 28.10.2026
- Updated
- 04.11.2026 10:00
Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.
OSV / GitHub Advisory Database - GHSA-5793-x2q3-c3q7 - CC BY 4.0
Vulnerability history: highcharts
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 7
- First → latest
- 03.2019 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 7
Disclosures per year
- 2019: 1
- 2020: 1
- 2021: 1
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 4
-
Highcharts: `javascript:` URL in credits.href runs script on click this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.