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.
Published: 2026-06-04
Score: 7.6 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

History

Thu, 04 Jun 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Chartbrew
Chartbrew chartbrew
Vendors & Products Chartbrew
Chartbrew chartbrew

Thu, 04 Jun 2026 20:15:00 +0000

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'}


Subscriptions

Chartbrew Chartbrew
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-04T19:28:55.627Z

Reserved: 2026-04-20T18:18:50.682Z

Link: CVE-2026-41518

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-06-04T20:16:57.960

Modified: 2026-06-04T20:16:57.960

Link: CVE-2026-41518

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-04T22:00:14Z

Weaknesses