CVE-2026-41518 Chartbrew has a stored DOM XSS via Chart Tooltip innerHTML (ChartDatasetConfig.legend)

High 7.6 Published Updated

Authenticated users can inject malicious scripts into chart tooltips, leading to code execution for all dashboard viewers.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-41518?

CVE-2026-41518 is a high-severity cross-site scripting vulnerability in chartbrew, published on 4 Jun 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Chartbrew is an open-source web application that can connect directly to databases and APIs and use the data to create charts. In versions 4.9.0 through 5.0.0, an authenticated user with project-editor permissions can store arbitrary HTML/JavaScript in the `ChartDatasetConfig.legend` field. The payload is persisted verbatim in the database, propagated through the Chart.js rendering pipeline, and injected into the tooltip DOM element via an unguarded `innerHTML` assignment in `ChartTooltip.js`. Every unauthenticated viewer of the public dashboard triggers JavaScript execution on page load — no hover interaction is required. Browser-based Playwright verification confirmed `alert('localhost')` fires immediately and `<img src="x" onerror="alert(document.domain)">` is present in the `#chartjs-tooltip` DOM element. Version 5.0.1 contains a fix.

Weakness: CWE-79

Which versions are affected by CVE-2026-41518?

How do I fix CVE-2026-41518?

No fix has been published for CVE-2026-41518 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-41518 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-41518 exists.

Sources

Also known as GHSA-6q2j-365c-7gqf.

Is CVE-2026-41518 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free