{"id":"CVE-2026-118244","kind":"vulnerability","aliases":["CVE-2026-118244","GHSA-65hg-cf3f-5m39"],"related":[],"title":"Highcharts Core: HTML text parsing falls back to unfiltered `innerHTML` during printing","description":"### Impact\nWhen the HTML text parser cannot obtain a document from `DOMParser` because the call throws, it falls back to assigning the raw markup to the `innerHTML` of an element created in the hosting document, and the allow-list is applied only to the resulting DOM afterwards. In Chromium the Trusted Types policy callback that the parser uses throws while a `beforeprint` handler is running, so if the hosting page re-renders the chart from a `beforeprint` handler, every HTML-rendered text option parsed at that moment, such as `useHTML` titles, axis labels and data labels or text set by responsive rules, is inserted unsanitized, and event handlers embedded in that markup run in the origin of the page hosting the chart. Exploitation requires that untrusted data reach the chart configuration, that the hosting page update the chart from a `beforeprint` handler in Chromium, and that printing be started, which the print item of the exporting menu does on its own. Charts built with Highcharts Stock, Maps and Gantt are included, since those ship from the same package as Core.\n\n### Workarounds\n**Drop-in fix - for any versions affected (12.0.0-13.0.2).**\nAdd the below IIFE to run after Highcharts is loaded. \n```\n((n)=>{n.AST.prototype.parseMarkup=function parseMarkup(t){let e,i=[];t=t.trim().replace(/ style=([\"'])/g,\" data-style=$1\");try{e=new DOMParser().parseFromString(tI?tI.createHTML(t):t,\"text/html\")}catch{}if(!e)try{e=new DOMParser().parseFromString(t,\"text/html\")}catch{}e||((e=n.doc.implementation.createHTMLDocument(\"\")).body.innerHTML=t);let s=(t,e)=>{let i=t.localName||t.nodeName.toLowerCase(),o={tagName:i};\"#text\"===i&&(o.textContent=t.textContent||\"\");let r=t.attributes;if(r){let t={};[].forEach.call(r,e=>{\"data-style\"===e.name?o.style=tB.parseStyle(e.value):t[e.name]=e.value}),o.attributes=t}if(t.childNodes.length){let e=[];[].forEach.call(t.childNodes,t=>{s(t,e)}),e.length&&(o.children=e)}e.push(o)};return[].forEach.call(e.body.childNodes,t=>s(t,i)),i};})(Highcharts);\n```\n[Live demo & testing](https://jsfiddle.net/BlackLabel/pb6jLf7g/)\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 falls back to raw innerHTML when DOMParser fails, and in Chromium a Trusted Types error during a beforeprint redraw lets untrusted chart text insert HTML. Event handlers in that markup then run in the page origin when printing starts.","severity":"high","cvss":7.2,"epss":null,"exploited":false,"exploited_at":null,"products":[{"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":["charts","cwe-79","frontend","highcharts","javascript","package"],"not_affected_if":["no-beforeprint-redraw","static-chart-text"],"how_to_check":"- Check the installed Highcharts version with `npm ls highcharts` or by reading `node_modules/highcharts/package.json`, and look for versions from `12.0.0` through `12.6.1` or `13.0.0` through `13.1.0`\n- Look for a `beforeprint` handler that redraws charts and renders untrusted text in titles, labels or data labels","fix":"- Upgrade Highcharts to `12.6.1` or `13.1.0`\n- Until then, do not pass untrusted text into chart options that render as HTML, and avoid redrawing charts in `beforeprint` handlers","status":"open","published_at":"2026-10-28T18:17:15+00:00","first_seen_at":"2026-10-28T18:34:33+00:00","triaged_at":"2026-10-28T18:34:55+00:00","updated_at":"2026-10-28T19:56:29+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-28T18:34:55Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Highcharts to `12.6.1` or `13.1.0`\n- Until then, do not pass untrusted text into chart options that render as HTML, and avoid redrawing charts in `beforeprint` handlers","reach":"internet","title":"Highcharts JS: chart text can run scripts in the page during printing","impact":"high","summary":"Highcharts falls back to raw innerHTML when DOMParser fails, and in Chromium a Trusted Types error during a beforeprint redraw lets untrusted chart text insert HTML. Event handlers in that markup then run in the page origin when printing starts.","category":"package","nicknames":[],"who_cares":["highcharts","javascript","frontend","charts"],"confidence":0.7,"needs_auth":"unknown","worst_case":"Attacker script runs in the page origin, reading session data and actions","analyst_note":"Confirm the exact trigger conditions and whether untrusted input is required, using the NVD entry at https://nvd.nist.gov/vuln/detail/CVE-2026-118244 and the Highcharts release notes.","how_to_check":"- Check the installed Highcharts version with `npm ls highcharts` or by reading `node_modules/highcharts/package.json`, and look for versions from `12.0.0` through `12.6.1` or `13.0.0` through `13.1.0`\n- Look for a `beforeprint` handler that redraws charts and renders untrusted text in titles, labels or data labels","needs_analyst":true,"not_affected_if":["static-chart-text","no-beforeprint-redraw"],"who_is_affected":"Pages that use Highcharts in a browser and feed user-controlled or third-party text into HTML-rendered titles, labels, data labels or responsive text are exposed, and the Stock, Maps and Gantt products in the same package are included. Pages that only show fixed chart text, or that do not redraw charts during printing, are less exposed. The sources do not say whether DOMParser failure is common in practice.","user_interaction":"yes","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000704,"input_tokens":3454,"output_tokens":717,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-118244':15A,23A '-2026':14A,22A '-79':28B '/13.1.0/highcharts.js.':437C '/blacklabel/pb6jlf7g/)':386C '/docs/getting-started/installation).':450C '/g':289C '1':293C '12.0.0':265C '13.0.2':266C '13.1.0':419C '5m39':20A '65hg':18A 'add':267C 'affect':264C,406C 'afterward':120C 'allow':111C 'allow-list':110C 'appli':114C 'assign':93C 'avail':395C 'axi':167C 'back':7A,35B,91C 'beforeprint':51B,135C,151C,216C 'body.innerhtml':318C 'built':238C 'call':87C 'callback':127C 'cannot':79C 'catch':304C,314C 'cdn':426C 'cf3f':19A 'channel':401C 'chart':26B,55B,148C,197C,205C,213C,237C 'chromium':44B,122C,219C 'code.highcharts.com':432C,436C 'code.highcharts.com/13.1.0/highcharts.js.':435C 'configur':206C 'core':2A,255C 'creat':103C 'cve':13A,21A 'cwe':27B 'data':170C,202C,291C,346C 'data-styl':290C,345C 'demo':382C 'distribut':400C 'document':82C,107C 'dom':119C 'dompars':40B,84C,297C,310C 'drop':258C 'drop-in':257C 'e':283C,295C,306C,308C,315C,316C,323C,344C,360C,366C,369C 'e.body.childnodes':374C 'e.length':367C 'e.name':348C,353C 'e.push':370C 'e.value':351C,354C 'element':102C 'embed':184C 'error':48B 'event':59B,182C 'everi':153C 'exampl':415C,434C 'exploit':198C 'export':231C 'fail':41B 'fall':6A,34B,90C 'fix':260C 'foreach.call':342C,361C,373C 'frontend':29B 'function':279C 'gantt':244C 'ghsa':17A 'ghsa-65hg-cf3f-5m39':16A 'guid':447C 'handler':60B,136C,152C,183C,217C 'highchart':1A,30B,33B,240C,274C,380C,418C,423C 'highcharts':24A,25A 'host':106C,142C,195C,209C 'html':3A,58B,76C,155C 'html-render':154C 'iif':270C 'impact':73C 'includ':246C 'innerhtml':10A,38B,99C 'insert':57B,179C 'instal':417C,442C,446C 'item':228C 'javascript':31B 'jsfiddle.net':385C 'jsfiddle.net/blacklabel/pb6jlf7g/)':384C 'label':168C,171C 'let':53B,282C,320C,324C,335C,340C,359C 'list':112C,412C 'live':381C 'load':276C,422C 'map':242C 'markup':63B,96C,187C 'menu':232C 'method':443C 'moment':162C 'n':277C 'n.ast.prototype.parsemarkup':278C 'n.doc.implementation.createhtmldocument':317C 'new':296C,309C 'npm':403C,416C 'o':328C,371C 'o.attributes':355C 'o.children':368C 'o.style':349C 'o.textcontent':333C 'obtain':80C,387C 'option':158C 'origin':69B,191C 'packag':32B,253C,407C 'page':68B,143C,194C,210C 'pars':5A,159C 'parsefromstr':298C,311C 'parsemarkup':280C 'parser':78C,130C 'patch':389C,392C,410C 'polici':126C 'print':12A,71B,222C,227C 'r':336C,339C,343C 'raw':37B,95C 're':145C 're-rend':144C 'reach':203C 'redraw':52B 'releas':393C 'render':146C,156C 'replac':287C 'requir':199C 'respons':176C 'result':118C 'return':372C 'rule':177C 'run':65B,138C,188C,272C 'see':444C 'set':174C 'ship':249C 'sinc':247C 'start':72B,224C 'stock':241C 'style':288C,292C,347C 't.attributes':337C 't.childnodes':362C 't.childnodes.length':358C 't.localname':326C 't.nodename.tolowercase':327C 't.textcontent':334C 't.trim':286C 'tagnam':329C 'tb.parsestyle':350C 'test':383C 'text':4A,56B,77C,157C,173C,331C 'text/html':303C,313C 'throw':88C,132C 'ti':299C 'ti.createhtml':300C 'titl':166C 'tri':294C,307C 'trust':46B,124C 'type':47B,125C 'unfilt':9A 'unsanit':180C 'untrust':54B,201C 'updat':211C 'upgrad':404C 'url':430C 'use':131C,427C 'usehtml':165C 'usual':399C 'version':263C,390C,411C,429C 'workaround':256C 'www.highcharts.com':449C 'www.highcharts.com/docs/getting-started/installation).':448C","nicknames":[],"mitigations":[],"who_affected":"Pages that use Highcharts in a browser and feed user-controlled or third-party text into HTML-rendered titles, labels, data labels or responsive text are exposed, and the Stock, Maps and Gantt products in the same package are included. Pages that only show fixed chart text, or that do not redraw charts during printing, are less exposed. The sources do not say whether DOMParser failure is common in practice.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-28T18:17:15+00:00","kev":null,"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/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-118244","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118244","severity":null,"published_at":"2026-10-28T18:17:15+00:00","modified_at":"2026-10-28T18:17:15+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-65hg-cf3f-5m39","url":"https://github.com/advisories/GHSA-65hg-cf3f-5m39","severity":"high","published_at":"2026-10-28T19:55:22+00:00","modified_at":"2026-10-28T19:55:25+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"}