CVE-2026-41518

Chartbrew has a stored DOM XSS via Chart Tooltip innerHTML (ChartDatasetConfig.legend)

Published Jun 4, 2026 CVSS 3.1 · 7.6 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Chartbrew’s ChartDatasetConfig.legend field can store arbitrary HTML or JavaScript that is persisted exactly as entered. When the chart renders, the stored value is injected into the tooltip element via an unguarded innerHTML assignment, allowing malicious script to execute as soon as the page loads. Because the echo of the payload occurs in the public dashboard, any user—authenticated or not—who visits the chart will trigger the injected code. The vulnerability is a classic stored DOM cross‑site scripting flaw (CWE‑79) that can steal session cookies, deface the site, or perform credential phishing against the viewer’s browser.

Affected Systems

Chartbrew, the open‑source analytics platform. Versions 4.9.0 through 5.0.0 are affected; version 5.0.1 and later contain a fix for this flaw.

Risk and Exploitability

The CVSS score of 7.6 labels it as high severity. The EPSS score is not available, so the exploitation probability is unknown, but the flaw is not listed in the CISA KEV catalog. An attacker needs an account with project‑editor permissions to inject the payload; however, once injected, any unauthenticated observer of the public chart will experience JavaScript execution immediately, without even hovering over the chart. The lack of an authentication precondition for the second step amplifies the risk to all users of the public dashboard.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Chartbrew to version 5.0.1 or newer, which sanitizes the legend field before rendering.
  • If upgrading immediately is not possible, enforce strict Content Security Policy headers that block inline scripts and JavaScript execution in tooltips.
  • Restrict project‑editor permissions to trusted administrators and audit any changes to the ChartDatasetConfig.legend field.
  • Sanitize or strip any HTML or JavaScript content submitted to the legend field before storing it in the database.

Generated by OpenCVE AI on June 4, 2026 at 21:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Chartbrew
Chartbrew chartbrew
Vendors & Products Chartbrew
Chartbrew chartbrew
Type Values Removed Values Added
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.
Title Chartbrew has a stored DOM XSS via Chart Tooltip innerHTML (ChartDatasetConfig.legend)
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 7.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 5, 2026, 7:34 PM
Reserved
Apr 20, 2026, 6:18 PM
Status
Deferred
Published
Jun 4, 2026, 8:16 PM
Modified
Jun 17, 2026, 10:46 AM