{"id":"CVE-2026-118251","kind":"vulnerability","aliases":["CVE-2026-118251","GHSA-5793-x2q3-c3q7"],"related":[],"title":"Highcharts: javascript: URL in credits.href runs script on click","description":"### Impact\nA `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.\n\n### Workarounds\nDrop-in fix - for any versions affected (5.0.0-13.0.2).\nAdd the below IIFE to run after Highcharts is loaded, but before a chart is created.\n\n```js\n!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);\n```\n[Live demo & testing](https://jsfiddle.net/BlackLabel/6a09ws1f/)\n\n### Obtaining the patched version\nThe patched releases are available from all the usual distribution channels. With npm, upgrade the affected package to the patched version listed above, for example `npm install highcharts@ 13.1.0`. If you load Highcharts from the CDN, use the versioned URLs on code.highcharts.com, for example `https://code.highcharts.com/13.1.0/highcharts.js`. For more on each installation method, see the [installation guide](https://www.highcharts.com/docs/getting-started/installation).","summary":"Highcharts JS assigns the credits link URL straight to the window location without checking the scheme. An attacker who controls the chart configuration can supply a javascript: URL that runs script in the hosting page's origin when a user clicks the credits label.","severity":"high","cvss":8.4,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"highcharts","fixed":["11.4.9"],"affected":"< 11.4.9","ecosystem":"npm"},{"name":"highcharts","fixed":["12.6.1"],"affected":">= 12.0.0, < 12.6.1","ecosystem":"npm"},{"name":"highcharts","fixed":["13.1.0"],"affected":">= 13.0.0, <= 13.0.2","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["cwe-79","highcharts","javascript","package","web-frontend"],"not_affected_if":["fixed-chart-config","no-user-supplied-chart-options"],"how_to_check":"- Check the installed version with `npm ls highcharts` (or the `highcharts` entry in package.json and lockfile)\n- Search the codebase for `credits` in chart configuration and look for any chart config built from user-supplied or stored data","fix":"- Upgrade `highcharts` to `11.4.9`, `12.6.1` or `13.1.0` (Highcharts Stock, Maps and Gantt ship from the same package)\n- Until upgraded, do not pass untrusted data into chart options, especially `credits.href`","status":"open","published_at":"2026-10-28T19:17:29+00:00","first_seen_at":"2026-10-28T19:34:54+00:00","triaged_at":"2026-10-28T19:35:51+00:00","updated_at":"2026-10-28T19:56:29+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-28T19:35:51Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `highcharts` to `11.4.9`, `12.6.1` or `13.1.0` (Highcharts Stock, Maps and Gantt ship from the same package)\n- Until upgraded, do not pass untrusted data into chart options, especially `credits.href`","reach":"internet","title":"Highcharts: credits link accepts javascript URLs, enabling script run on click","impact":"high","summary":"Highcharts JS assigns the credits link URL straight to the window location without checking the scheme. An attacker who controls the chart configuration can supply a javascript: URL that runs script in the hosting page's origin when a user clicks the credits label.","category":"package","nicknames":[],"who_cares":["javascript","highcharts","web-frontend"],"confidence":0.6,"needs_auth":"unknown","worst_case":"Attacker script runs in the hosting page's origin after a click","analyst_note":"Confirm the affected version ranges and whether the attacker needs chart-config control; check the Highcharts security advisory for exact details.","how_to_check":"- Check the installed version with `npm ls highcharts` (or the `highcharts` entry in package.json and lockfile)\n- Search the codebase for `credits` in chart configuration and look for any chart config built from user-supplied or stored data","needs_analyst":true,"not_affected_if":["fixed-chart-config","no-user-supplied-chart-options"],"who_is_affected":"Pages that render Highcharts charts from configuration an attacker can influence, such as user-saved dashboards, shared chart embeds or charts built from stored content. Exposure needs a user to click the credits label. Applications that only render charts from fixed, server-controlled configuration are much less exposed.","user_interaction":"yes","needs_special_setup":"unknown","severity_if_unknown":"high"},"cost_usd":0.000652,"input_tokens":3396,"output_tokens":624,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-118251':12A,20A '-2026':11A,19A '-5793':14A '-79':25B '/13.1.0/highcharts.js':296C '/blacklabel/6a09ws1f/)':245C '/docs/getting-started/installation).':309C '0':205C,219C,236C '13.0.2':170C '13.1.0':278C '5.0.0':169C 'add':171C 'affect':168C,265C 'allow':101C 'allowed-schem':100C 'assign':34B,84C 'attack':49B,105C 'avail':254C 'begin':80C 'built':142C 'c':211C,221C 'c3q7':17A 'cdn':285C 'channel':260C 'chart':53B,109C,123C,131C,141C,184C 'check':45B,97C 'click':9A,72B,94C,137C 'code.highcharts.com':291C,295C 'code.highcharts.com/13.1.0/highcharts.js':294C 'configur':54B,110C,132C 'control':51B,107C 'core':159C 'creat':186C 'credit':36B,74B,91C,139C 'credits.href':5A,78C 'cve':10A,18A 'cwe':24B 'data':128C 'delet':213C 'demo':241C 'distribut':259C 'drop':162C 'drop-in':161C 'e':197C,224C 'e.call':215C 'e.some':232C 'exampl':274C,293C 'exploit':124C 'fix':164C 'frontend':31B 'function':188C,200C,220C,233C 'gantt':148C 'ghsa':13A 'guid':306C 'highchart':1A,26B,32B,144C,178C,239C,277C,282C 'highcharts':21A,22A,23A 'host':65B,121C 'iif':174C 'impact':76C 'includ':150C 'instal':276C,301C,305C 'javascript':2A,27B,58B,82C 'js':33B,187C 'jsfiddle.net':244C 'jsfiddle.net/blacklabel/6a09ws1f/)':243C 'label':75B,92C,140C 'link':37B 'list':103C,271C 'live':240C 'load':180C,281C 'locat':43B,88C 'mailto':227C 'map':146C 'method':302C 'n':201C,207C 'npm':262C,275C 'o':203C,209C,217C 'o.href':210C,212C,214C 'obtain':246C 'origin':68B,117C 'packag':28B,157C,266C 'page':66B,120C 'patch':248C,251C,269C 'r':195C,222C,231C 'r.addcredits':198C,199C 'r.creditshrefpatched':218C 'r.indexof':237C 'reach':129C 'releas':252C 'requir':125C 'return':208C,228C,235C 'run':6A,61B,113C,176C 'scheme':47B,102C 'script':7A,62B,114C 'see':303C 'ship':153C 'sinc':151C 'stock':145C 'straight':39B 'string':229C 'suppli':56B 't.ast':225C 't.ast.allowedreferences':226C 't.chart':192C 't.chart.prototype':196C 't.chart.prototype.creditshrefpatched':193C 't.merge':204C 'test':242C 'therefor':112C 'this.options.credits':206C 'typeof':230C 'untrust':127C 'upgrad':263C 'url':3A,38B,59B,289C 'use':286C 'user':71B,136C 'usual':258C 'valu':79C 'var':194C,202C,223C 'version':167C,249C,270C,288C 'web':30B 'web-frontend':29B 'window':42B,87C 'without':44B,95C 'workaround':160C 'www.highcharts.com':308C 'www.highcharts.com/docs/getting-started/installation).':307C 'x2q3':16A 'x2q3-c3q7':15A","nicknames":[],"mitigations":[],"who_affected":"Pages that render Highcharts charts from configuration an attacker can influence, such as user-saved dashboards, shared chart embeds or charts built from stored content. Exposure needs a user to click the credits label. Applications that only render charts from fixed, server-controlled configuration are much less exposed.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-28T19:17:29+00:00","kev":null,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-118251","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118251","severity":null,"published_at":"2026-10-28T19:17:29+00:00","modified_at":"2026-10-28T19:17:29+00:00","first_seen_at":"2026-10-28T19:34:54+00:00","fetched_at":"2026-10-28T19:34:54+00:00","note":null},{"source":"ghsa","external_id":"GHSA-5793-x2q3-c3q7","url":"https://github.com/advisories/GHSA-5793-x2q3-c3q7","severity":"high","published_at":"2026-10-28T19:56:23+00:00","modified_at":"2026-10-28T19:56:37+00:00","first_seen_at":"2026-10-28T19:56:29+00:00","fetched_at":"2026-10-28T20:01:43+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}