High

Highcharts Core: `javascript:` URL in an `xlink:href` attribute survives text filtering and reaches exported charts

  • Disclosed: 28.10.2026
  • Updated: 03.11.2026 10:00

Impact

The filter applied to markup in text options checks href, src, and a few similar attributes against an allowed-scheme list, but accepts xlink:href without that check. Consequently, an SVG anchor whose xlink:href is a javascript: URL passes the filter, whether or not the option is rendered with useHTML. In the live page, the attribute is written without the XLink namespace, preventing browsers from treating the anchor as an active link there.

However, the attribute is preserved verbatim in the chart's serialized output. The SVG produced by the exporting module (including the default SVG download) declares the XLink namespace and contains the anchor, as does the markup of the chart container. Any document that parses this output again—such as a downloaded SVG opened directly in a browser or a page that inlines exported or server-rendered chart markup—creates a working link. An attacker who controls the chart configuration can thereby execute script within the origin of that document when a user activates the link.

Exploitation requires that:

  1. Untrusted data reaches a text option (such as the title).
  2. The chart is exported or its markup is serialized and parsed again.
  3. A user activates the link.

Workarounds

A drop-in fix is available for all affected versions (10.3.2 - 13.1.0).

Execute the following code after Highcharts is loaded, but before creating any chart:

!function(t){var e=t&&t.AST;if(e&&"function"==typeof e.filterUserAttributes&&!e.xlinkHrefPatched){var r=e.filterUserAttributes,n=Object.prototype.hasOwnProperty;e.filterUserAttributes=function(t){return t&&n.call(t,"xlink:href")&&!o(t["xlink:href"])&&delete t["xlink:href"],r.call(this,t)},e.xlinkHrefPatched=!0}function o(t){var r=e.allowedReferences||["https://","http://","mailto:","/","../","./","#"];return"string"==typeof t&&r.some(function(e){return 0===t.indexOf(e)})}}(Highcharts);

Obtaining the Patched Version

Patched releases are available through standard distribution channels. When using npm, upgrade the affected package to a fixed version, such as npm install highcharts@13.1.1. If loading Highcharts via CDN, use the versioned URLs on code.highcharts.com, such as https://code.highcharts.com/13.1.1/highcharts.js. For additional details on installation methods, see the installation guide.).

What to do

Upgrade Highcharts to version 11.4.9, 12.6.2, 13.1.1, or later using your package manager (for example, npm install highcharts@13.1.1) or CDN URLs (for example, https://code.highcharts.com/13.1.1/highcharts.js). Refer to the installation guide.) for further instructions.

If upgrading is not immediately possible, apply the workaround by running the following script after Highcharts loads and before initializing a chart:

!function(t){var e=t&&t.AST;if(e&&"function"==typeof e.filterUserAttributes&&!e.xlinkHrefPatched){var r=e.filterUserAttributes,n=Object.prototype.hasOwnProperty;e.filterUserAttributes=function(t){return t&&n.call(t,"xlink:href")&&!o(t["xlink:href"])&&delete t["xlink:href"],r.call(this,t)},e.xlinkHrefPatched=!0}function o(t){var r=e.allowedReferences||["https://","http://","mailto:","/","../","./","#"];return"string"==typeof t&&r.some(function(e){return 0===t.indexOf(e)})}}(Highcharts);

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package highcharts >= 10.3.2, < 11.4.9, >= 12.0.0, < 12.6.2, >= 13.0.0, < 13.1.1 11.4.9, 12.6.2, 13.1.1

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/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
03.11.2026 10:00

Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.

OSV / GitHub Advisory Database - GHSA-mw4f-gj5x-6xr4 - 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

  1. 2019: 1
  2. 2020: 1
  3. 2021: 1
  4. 2022: 0
  5. 2023: 0
  6. 2024: 0
  7. 2025: 0
  8. 2026: 4
  1. High CVE-2026-118251 < 11.4.9, >= 12.0.0, < 12.6.1, >= 13.0.0, < 13.1.0 11.4.9, 12.6.1, 13.1.0
  2. High CVE-2026-118246 >= 10.0.0, < 11.4.9, >= 12.0.0, < 12.6.1, >= 13.0.0, < 13.1.0 11.4.9, 12.6.1, 13.1.0
  3. High CVE-2026-118244 >= 12.0.0, < 12.6.1, >= 13.0.0, < 13.1.0 12.6.1, 13.1.0
  4. Highcharts Core: `javascript:` URL in an `xlink:href` attribute survives text filtering and reaches exported charts this entry
    High CVE-2026-116796 >= 10.3.2, < 11.4.9, >= 12.0.0, < 12.6.2, >= 13.0.0, < 13.1.1 11.4.9, 12.6.2, 13.1.1
  5. High · 8.7 ghsa-gr4j-r575-g665 < 7.2.2, >= 8.0.0, < 8.1.1 7.2.2, 8.1.1
  6. High · 7.5 CVE-2018-20801 < 6.1.0 6.1.0

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.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.