CVE-2026-41518
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 · uneditedChartbrew 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 confidenceThis 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.
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 checksWork through these to decide whether this CVE applies to you.
-
Identify Chartbrew installation and versionCheck 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 rootAffected if version is below 5.0.1 (the fixed release)
-
Determine if public dashboard access is enabledInspect 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 tablesAffected if public dashboards are enabled and accessible to unauthenticated users
-
Inspect ChartDatasetConfig.legend field for malicious payloadsQuery 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 patternsAffected if any records contain unsanitized HTML/script tags in the legend field
-
Review ChartTooltip.js for unsafe innerHTML usageExamine 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.
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 · scopedUpgrade 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.
5.0.1
- Verify current Chartbrew version by checking package.json or running `npm list chartbrew` or similar
- Back up the database and application configuration
- Upgrade to version 5.0.1 using the package manager (e.g., `npm install [email protected]` or `yarn add [email protected]`)
- Restart the Chartbrew application services
- 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.
- Consultation2.0 h
- Implementation1.0 h
- Testing3.0 h
- Review / QA2.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-41518 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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