Cross-site Scripting (XSS)Weakness · CWE-79

CVE-2026-41518

HIGH · 7.6 CVSS v3.1 Published 2026-06-04
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
80/100
Remediation priority · High
Remotely reachable

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

This is a stored XSS vulnerability in Chartbrew where an authenticated user with project-editor permissions can inject malicious JavaScript into the ChartDatasetConfig.legend field. The payload is persisted in the database and automatically executed when any user views the public dashboard because the Chart.js tooltip rendering in ChartTooltip.js uses unsafe innerHTML assignment without sanitization.

MitigationUpgrade to version 5.0.1 or later which contains the fix. Until then, disable public dashboard access or implement input validation/sanitization on the legend field before rendering.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Chartbrew installation and version
    Check the package.json file in the Chartbrew installation directory for the version field, or run 'npm list chartbrew' or 'node -e "require('./package.json').version"' from the application root
    Affected if version is below 5.0.1 (the fixed release)
  2. Determine if public dashboard access is enabled
    Inspect the Chartbrew configuration file (typically config.js, .env, or database settings) for public dashboard settings, or check the 'public' field in the project/dashboard database tables
    Affected if public dashboards are enabled and accessible to unauthenticated users
  3. Inspect ChartDatasetConfig.legend field for malicious payloads
    Query the database (typically MongoDB or MySQL depending on installation) for any records in the dataset config table where the legend field contains script tags, javascript:, onload, onerror, or other XSS patterns
    Affected if any records contain unsanitized HTML/script tags in the legend field
  4. Review ChartTooltip.js for unsafe innerHTML usage
    Examine the ChartTooltip.js file in the Chartbrew source code under the client/rendering directory for 'innerHTML' assignments without prior sanitization (such as DOMPurify or similar)
    Affected if unsafe innerHTML assignment is present without sanitization in the tooltip rendering code

The environment is affected if running a version below 5.0.1, public dashboard access is enabled, AND a malicious payload exists in the ChartDatasetConfig.legend field in the database.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade to version 5.0.1 or later which contains the fix. Until then, disable public dashboard access or implement input validation/sanitization on the legend field before rendering.

Recommended fix High confidence

5.0.1

  1. Verify current Chartbrew version by checking package.json or running `npm list chartbrew` or similar
  2. Back up the database and application configuration
  3. Upgrade to version 5.0.1 using the package manager (e.g., `npm install [email protected]` or `yarn add [email protected]`)
  4. Restart the Chartbrew application services
  5. Verify the application functions correctly and the vulnerability is resolved by checking that the legend field no longer accepts arbitrary HTML/JavaScript in the ChartDatasetConfig

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing3.0 h
  • Review / QA2.0 h
8.0 hours of engineering $1,390
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,224.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-41518 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-41518 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data