{"id":"CVE-2026-118242","kind":"vulnerability","aliases":["CVE-2026-118242","GHSA-6g3c-p4fg-xv47"],"related":[],"title":"Highcharts Grid: custom icon definition objects written with raw `setAttribute` on `<path>`","description":"### Impact\nA custom icon supplied under `rendering.icons` as an icon definition object is built by creating an SVG path for each of its child entries and setting every key of that entry as an attribute of the path, without filtering the attribute names; only the string form of the option is passed through the markup allow-list. An attacker who controls the Grid configuration can therefore supply child entries whose keys name event handlers, and those handlers execute in the origin of the page hosting the Grid. Custom icons take precedence over the built-in ones, so the attacker can replace icons that render without any further configuration, such as the sort icon shown in every column header by default and the pagination controls where pagination is enabled, and does not need any reference to a custom icon name. Exploitation requires that untrusted data reach the Grid configuration and that a user hover over or activate an affected icon.\n\n### Workarounds\nIf your Grid configuration comes from a source you do not fully control, paste this snippet right after importing the Grid module:\n\n```ts\n(function () {\n    const GridNS = typeof Grid !== 'undefined' ? Grid : undefined;\n    const GridClass = GridNS && GridNS.Grid;\n\n    if (!GridClass || !GridClass.prototype.loadUserOptions) {\n        return; // Grid not loaded\n    }\n\n    const allowedPathAttributes = [\n        'd',\n        'fill',\n        'opacity',\n        'stroke',\n        'stroke-width',\n        'stroke-linecap',\n        'stroke-linejoin',\n        'transform'\n    ];\n\n    const originalLoadUserOptions = GridClass.prototype.loadUserOptions;\n\n    function sanitizeIconValue(value) {\n        if (!value || typeof value === 'string') {\n            return value;\n        }\n\n        const children = value.children || [];\n        const sanitizedChildren = [];\n\n        for (let i = 0; i < children.length; i++) {\n            const child = children[i] || {};\n            const clean = {};\n\n            for (let j = 0; j < allowedPathAttributes.length; j++) {\n                const attr = allowedPathAttributes[j];\n                if (child[attr] !== undefined && child[attr] !== null) {\n                    clean[attr] = child[attr];\n                }\n            }\n\n            sanitizedChildren.push(clean);\n        }\n\n        return {\n            width: value.width,\n            height: value.height,\n            viewBox: value.viewBox,\n            fill: value.fill,\n            children: sanitizedChildren\n        };\n    }\n\n    function sanitizeIconsMap(icons) {\n        if (!icons) {\n            return icons;\n        }\n\n        const out = {};\n        for (const key in icons) {\n            if (Object.prototype.hasOwnProperty.call(icons, key)) {\n                out[key] = sanitizeIconValue(icons[key]);\n            }\n        }\n        return out;\n    }\n\n    GridClass.prototype.loadUserOptions = function (newOptions) {\n        if (\n            newOptions &&\n            newOptions.rendering &&\n            newOptions.rendering.icons\n        ) {\n            newOptions.rendering.icons = sanitizeIconsMap(\n                newOptions.rendering.icons\n            );\n        }\n\n        return originalLoadUserOptions.apply(this, arguments);\n    };\n}());\n```\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/grid-lite@3.2.0`. If you load Highcharts Grid from a CDN, use a versioned URL, for example `https://cdn.jsdelivr.net/npm/@highcharts/grid-lite@3.2.0/grid-lite.js`. For more on each installation method, see the [installation guide](https://www.highcharts.com/docs/grid/installation).","summary":"Highcharts Grid copied every key of a custom icon definition onto an SVG element as an attribute, including event-handler attributes. An attacker who controls Grid configuration can make script run in the hosting page's origin when a user hovers over or activates a replaced sort or pagination icon.","severity":"high","cvss":8.5,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"@highcharts/grid-lite","fixed":["3.2.0"],"affected":">= 2.3.0, <= 3.1.0","ecosystem":"npm"},{"name":"@highcharts/grid-pro","fixed":["3.2.0"],"affected":">= 2.3.0, <= 3.1.0","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["cwe-79","frontend","highcharts","javascript","package","self-hosted"],"not_affected_if":["fixed-version","no-grid","static-config"],"how_to_check":"- Check the installed Highcharts version with `npm ls highcharts` or the `version` field in `node_modules/highcharts/package.json`.\n- Search your code for `rendering.icons` in Grid configuration and check whether any part of that config comes from user input or a stored value.","fix":"- Upgrade Highcharts to `3.2.0` or later.\n- Until upgraded, do not let untrusted users set Grid configuration or icon definitions.","status":"open","published_at":"2026-10-28T18:17:14+00:00","first_seen_at":"2026-10-28T18:34:33+00:00","triaged_at":"2026-10-28T18:34:46+00:00","updated_at":"2026-10-28T19:56:29+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-28T18:34:46Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Highcharts to `3.2.0` or later.\n- Until upgraded, do not let untrusted users set Grid configuration or icon definitions.","reach":"internet","title":"Highcharts Grid: custom icon config lets script run in the page","impact":"high","summary":"Highcharts Grid copied every key of a custom icon definition onto an SVG element as an attribute, including event-handler attributes. An attacker who controls Grid configuration can make script run in the hosting page's origin when a user hovers over or activates a replaced sort or pagination icon.","category":"package","nicknames":[],"who_cares":["highcharts","javascript","frontend","self-hosted"],"confidence":0.7,"needs_auth":"unknown","worst_case":"script runs in the hosting page's origin, reading session data","analyst_note":"","how_to_check":"- Check the installed Highcharts version with `npm ls highcharts` or the `version` field in `node_modules/highcharts/package.json`.\n- Search your code for `rendering.icons` in Grid configuration and check whether any part of that config comes from user input or a stored value.","needs_analyst":false,"not_affected_if":["static-config","no-grid","fixed-version"],"who_is_affected":"Applications that use Highcharts Grid from version 2.3.0 up to 3.2.0 and build its configuration, including custom icons under rendering.icons, from data an end user can influence. Pages that only use fixed, developer-written Grid configuration are not exposed by this flaw.","user_interaction":"yes","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000616,"input_tokens":3385,"output_tokens":555,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-118242':13A,21A '-2026':12A,20A '-79':25B '/docs/grid/installation).':471C '/npm/@highcharts/grid-lite@3.2.0/grid-lite.js':458C '0':325C,338C '3.2.0':441C '6g3c':16A 'activ':77B,241C 'affect':243C,428C 'allow':140C 'allow-list':139C 'allowedpathattribut':289C,344C 'allowedpathattributes.length':340C 'argument':408C 'attack':56B,143C,184C 'attr':343C,348C,351C,354C,356C 'attribut':49B,54B,118C,125C 'avail':417C 'built':97C,179C 'built-in':178C 'cdn':449C 'cdn.jsdelivr.net':457C 'cdn.jsdelivr.net/npm/@highcharts/grid-lite@3.2.0/grid-lite.js':456C 'channel':423C 'child':107C,152C,330C,347C,350C,355C 'children':318C,331C,368C 'children.length':327C 'clean':334C,353C,358C 'column':202C 'come':250C 'configur':60B,148C,193C,233C,249C 'const':270C,277C,288C,304C,317C,320C,329C,333C,342C,377C,380C 'control':58B,145C,209C,258C 'copi':35B 'creat':99C 'custom':3A,40B,86C,172C,222C 'cve':11A,19A 'cwe':24B 'd':290C 'data':229C 'default':205C 'definit':5A,42B,94C 'distribut':422C 'element':46B 'enabl':213C 'entri':108C,115C,153C 'event':52B,157C 'event-handl':51B 'everi':36B,111C,201C 'exampl':437C,455C 'execut':162C 'exploit':225C 'fill':291C,366C 'filter':123C 'form':130C 'frontend':26B 'fulli':257C 'function':269C,307C,370C,396C 'ghsa':15A 'ghsa-6g3c-p4fg-xv47':14A 'grid':2A,34B,59B,147C,171C,232C,248C,266C,273C,275C,285C,446C 'gridclass':278C,282C 'gridclass.prototype.loaduseroptions':283C,306C,395C 'gridn':271C,279C 'gridns.grid':280C 'guid':468C 'handler':53B,158C,161C 'header':203C 'height':362C 'highchart':1A,27B,33B,445C 'highcharts/grid-lite':22A,440C 'highcharts/grid-pro':23A 'host':32B,67B,169C 'hover':74B,238C 'icon':4A,41B,83B,87C,93C,173C,187C,198C,223C,244C,372C,374C,376C,383C,386C,391C 'impact':84C 'import':264C 'includ':50B 'instal':439C,463C,467C 'j':337C,339C,341C,345C 'javascript':28B 'key':37B,112C,155C,381C,387C,389C,392C 'let':323C,336C 'linecap':299C 'linejoin':302C 'list':141C,434C 'load':287C,444C 'make':62B 'markup':138C 'method':464C 'modul':267C 'name':126C,156C,224C 'need':217C 'newopt':397C,399C 'newoptions.rendering':400C 'newoptions.rendering.icons':401C,402C,404C 'npm':425C,438C 'null':352C 'object':6A,95C 'object.prototype.hasownproperty.call':385C 'obtain':409C 'one':181C 'onto':43B 'opac':292C 'option':133C 'origin':70B,165C 'originalloaduseropt':305C 'originalloaduseroptions.apply':406C 'p4fg':17A 'packag':29B,429C 'page':68B,168C 'pagin':82B,208C,211C 'pass':135C 'past':259C 'patch':411C,414C,432C 'path':102C,121C 'preced':175C 'raw':9A 'reach':230C 'refer':219C 'releas':415C 'render':189C 'rendering.icons':90C 'replac':79B,186C 'requir':226C 'return':284C,315C,359C,375C,393C,405C 'right':262C 'run':64B 'sanitizedchildren':321C,369C 'sanitizedchildren.push':357C 'sanitizeiconsmap':371C,403C 'sanitizeiconvalu':308C,390C 'script':63B 'see':465C 'self':31B 'self-host':30B 'set':110C 'setattribut':10A 'shown':199C 'snippet':261C 'sort':80B,197C 'sourc':253C 'string':129C,314C 'stroke':293C,295C,298C,301C 'stroke-linecap':297C 'stroke-linejoin':300C 'stroke-width':294C 'suppli':88C,151C 'svg':45B,101C 'take':174C 'therefor':150C 'transform':303C 'ts':268C 'typeof':272C,312C 'undefin':274C,276C,349C 'untrust':228C 'upgrad':426C 'url':453C 'use':450C 'user':73B,237C 'usual':421C 'valu':309C,311C,313C,316C 'value.children':319C 'value.fill':367C 'value.height':363C 'value.viewbox':365C 'value.width':361C 'version':412C,433C,452C 'viewbox':364C 'whose':154C 'width':296C,360C 'without':122C,190C 'workaround':245C 'written':7A 'www.highcharts.com':470C 'www.highcharts.com/docs/grid/installation).':469C 'xv47':18A","nicknames":[],"mitigations":[],"who_affected":"Applications that use Highcharts Grid from version 2.3.0 up to 3.2.0 and build its configuration, including custom icons under rendering.icons, from data an end user can influence. Pages that only use fixed, developer-written Grid configuration are not exposed by this flaw.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-28T18:17:14+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/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-118242","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118242","severity":null,"published_at":"2026-10-28T18:17:14+00:00","modified_at":"2026-10-28T18:17:14+00:00","first_seen_at":"2026-10-28T18:34:33+00:00","fetched_at":"2026-10-28T18:34:33+00:00","note":null},{"source":"ghsa","external_id":"GHSA-6g3c-p4fg-xv47","url":"https://github.com/advisories/GHSA-6g3c-p4fg-xv47","severity":"high","published_at":"2026-10-28T19:55:46+00:00","modified_at":"2026-10-28T19:55:46+00:00","first_seen_at":"2026-10-28T19:56:29+00:00","fetched_at":"2026-10-28T19:56:29+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"}