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

- Severity: High 7.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-04T19:28:55.627Z
- Modified: 2026-06-17T10:46:49.690Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- chartbrew chartbrew: >= 4.9.0, < 5.0.1

## References

- <https://github.com/chartbrew/chartbrew/security/advisories/GHSA-6q2j-365c-7gqf> (exploit)

## Sources

- CVE List: [CVE-2026-41518](https://www.cve.org/CVERecord?id=CVE-2026-41518), CVE Terms of Use, modified 2026-06-05
- NVD: [CVE-2026-41518](https://nvd.nist.gov/vuln/detail/CVE-2026-41518), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-41518 · Whole record: https://cve.day/CVE-2026-41518.json · Rebuilt by cve.day 2026-11-25T22:59:23.724Z
