/

CVE-2026-32117

Severity:

HIGH RISK

(7.6)

XSS in Grafana Cubism Panel Zoom Link Handler

CVE-2026-32117

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Arbitrary JavaScript execution in the user's browser within the Grafana origin

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The grafanacubism-panel plugin for Grafana contains a DOM-based cross-site scripting issue in its zoom-link handler, where an editor-controlled URL is passed directly to window.location.assign() / window.open() without scheme validation.

An attacker with dashboard Editor privileges can supply a javascript: URI so that when any Viewer drag-zooms on the panel, arbitrary script executes in the context of the Grafana origin.

Affected context

This vulnerability occurs in Grafana environments that use the grafanacubism-panel plugin version 0.1.2 and earlier.

The affected code path is the zoom-link handler, which reacts to user drag-zoom interactions on the panel and navigates the browser to a URL defined by the dashboard editor.

The issue manifests when this URL is treated as fully trusted and is passed directly into browser navigation APIs, without validating that it uses a safe scheme (such as https: or http:) or enforcing a restrictive URL policy.

Exploit preconditions

  • Attack surface: Grafana dashboards rendered in a browser that include the grafanacubism-panel.
  • Required access: Attacker must have Editor-level access (or equivalent) to modify the affected panel configuration and set the zoom link.
  • User interaction: A victim with at least Viewer access must load the compromised dashboard and perform a drag-zoom action on the panel, which triggers the zoom-link handler.
  • Trigger point: The handler calls window.location.assign() or window.open() with the unvalidated editor-supplied URL.
  • Why exploitation is possible: The plugin does not validate or sanitize the URL scheme, allowing javascript: URLs that are executed by the browser as script in the context of the Grafana origin.

Why this happens

The root cause is a DOM-based cross-site scripting pattern where untrusted data is used as a URL sink without validation.

The plugin's zoom-link handler takes a dashboard configuration value (controlled by an Editor) and passes it directly into browser navigation APIs (window.location.assign() / window.open()), assuming it is safe.

Because the code does not enforce a safe URL scheme whitelist or apply any encoding/sanitization, an attacker can supply a javascript: URI that the browser interprets as executable script.

This aligns with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting), specifically the DOM-based variant where client-side logic introduces the XSS by misusing untrusted input in security-sensitive DOM API calls.

Potential impact

  • Execution of arbitrary JavaScript in the victim's browser within the Grafana origin.
  • Theft or manipulation of data accessible through the Grafana web UI (e.g., dashboard content, API tokens exposed in the UI, or session-related data).
  • Unauthorized actions performed on behalf of the victim via their authenticated Grafana session (e.g., modifying dashboards, changing settings if the victim has higher privileges).
  • Pivoting to other internal resources accessible from the victim's browser through the Grafana origin, depending on how Grafana is integrated in the environment.
  • Planting of persistent malicious links or UI elements within dashboards to target additional users.

General mitigation guidance

Effective mitigation focuses on treating any user-configurable URL as untrusted and enforcing strict navigation policies in client-side code:

  • Restrict destination URLs to a safe scheme whitelist (e.g., https:, http:) and reject or ignore unapproved schemes such as javascript:, data:, or vbscript:.
  • Prefer constructing navigation targets from known-safe base URLs and constrained parameters rather than accepting arbitrary URLs from configuration fields.
  • Apply centralized helper functions for opening links or changing window.location that always perform scheme and origin validation before navigation.
  • Limit the capability of dashboard editors to inject free-form URLs when they are used in security-sensitive locations; favor predefined link targets or parameterized templates.
  • Implement content security controls in the application where feasible (e.g., strict Content Security Policy that disallows javascript: URLs and inline script execution), understanding that this is a defense-in-depth measure.
  • Encourage a least-privilege model for Grafana roles, ensuring editor rights are given only when strictly necessary to reduce the risk surface.

How teams detect issues like this

Detection typically combines code-level analysis and runtime monitoring:

  • Static analysis: Configure static analysis rules or linters to flag direct use of untrusted values (e.g., configuration fields or user-controlled strings) in sinks like window.location, window.open, or document.location without preceding validation or sanitization.
  • Code review: During review of Grafana plugins or frontend code, look for:
  • Use of javascript: or similar schemes in code or configurations.
  • Any patterns where user- or editor-supplied strings flow into navigation APIs or other DOM sinks (e.g., innerHTML, eval, setTimeout with string arguments).
  • Automated tooling: Integrate SAST tools that understand client-side XSS patterns into CI pipelines for plugin and frontend repositories.
  • Runtime monitoring: Where feasible, use browser security features and CSP violation reporting to detect attempts to load javascript: URLs or blocked script execution originating from dashboard interactions.

Sources

SourceLink
github.comgithub.com/ekacnet/grafanacubism-panel/commit/b79cbf7e5eb3225bb204bcef274e15e6b19d9926
github.comgithub.com/ekacnet/grafanacubism-panel/security/advisories/GHSA-q6fh-6m3m-5948

Frequently asked

questions

Yes, in typical deployments it is remotely exploitable against users who can access the affected Grafana dashboard. An attacker with Editor access can craft a malicious zoom link; any remote Viewer who opens the dashboard and performs a drag-zoom action can have arbitrary script executed in their browser.

The attacker must have at least Editor-level privileges (or an equivalent role that can modify panel configuration) in the relevant Grafana dashboard. Viewers are the victims, not the direct attackers; they only need permission to view and interact with the dashboard.

The safest pattern is to centralize link handling and enforce strict URL validation before navigation. This includes whitelisting allowed schemes (e.g., https:, http:), rejecting or ignoring unsafe schemes like javascript:, and ideally constraining navigation targets to known-safe origins or relative paths generated by the application.

To prevent similar DOM-based XSS issues, treat all configuration-driven and user-controlled data as untrusted, apply robust input validation and output encoding, and use secure helper abstractions for dangerous browser APIs. Combine these with systematic security reviews of frontend code, automated static analysis tuned for client-side XSS, and adherence to least-privilege role assignments in Grafana and comparable platforms.

Find out what's already
exploitable in your codebase.