Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. github.com/grafana/grafana
  4. ›
  5. CVE-2022-39324

CVE-2022-39324: Grafana Spoofing originalUrl of snapshots

May 14, 2024

To create a snapshot (and insert an arbitrary URL) the built-in role Viewer is sufficient. When a dashboard is shared as a local snapshot, the following three fields are offered in the web UI for a user to fill out: • Snapshotname • Expire • Timeout(seconds) After the user confirms creation of the snapshot (i.e. clicks the ”Local Snapshot” button) an HTTP POST request is sent to the Grafana server. The HTTP request contains additional parameters that are not visible in the web UI. The parameter originalUrl is not visible in the web UI, but sent in the HTTP POST request.

The value of the originalUrl parameter is automatically generated. The purpose of the presented originalUrl parameter is to provide a user that views the snapshot the possibility to click on the button in the Grafana web UI and be presented with the dashboard that the snapshot was made out of.

The value of the originalUrl parameter can be arbitrarily chosen by a malicious user that creates the snapshot (Note: by editing the query thanks to a web proxy like Burp) When another user opens the URL of the snapshot, they will be presented with the regular web interface delivered by the trusted Grafana server. The issue here is that the ”Open original dashboard” button no longer points to the to the real original dashboard but to the attacker’s (injected) URL.

References

  • github.com/advisories/GHSA-4724-7jwc-3fpw
  • github.com/grafana/grafana
  • github.com/grafana/grafana/commit/239888f22983010576bb3a9135a7294e88c0c74a
  • github.com/grafana/grafana/commit/d7dcea71ea763780dc286792a0afd560bff2985c
  • github.com/grafana/grafana/pull/60232
  • github.com/grafana/grafana/pull/60256
  • github.com/grafana/grafana/security/advisories/GHSA-4724-7jwc-3fpw
  • nvd.nist.gov/vuln/detail/CVE-2022-39324

Code Behaviors & Features

Detect and mitigate CVE-2022-39324 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 8.5.16, all versions starting from 9.0.0 before 9.2.8

Fixed versions

  • 9.2.8
  • 8.5.16

Solution

Upgrade to versions 8.5.16, 9.2.8 or above.

Impact 6.7 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/github.com/grafana/grafana/CVE-2022-39324.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:34 +0000.