# CVE-2025-6023: Grafana is vulnerable to XSS attacks through open redirects and path traversal

> Attackers can exploit an open redirect in Grafana to chain with path traversal for XSS, requiring an upgrade to patched versions.

- **Severity:** High 7.6 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 18 Jul 2025
- **Updated:** 18 Jul 2025
- **Also known as:** BIT-grafana-2025-6023, GHSA-vqph-p5vc-g644, GO-2025-3817, MINI-3pq5-cwjw-2537, MINI-4wfc-4fg6-v6w6, MINI-5qvr-546f-8c2c, MINI-6hvg-qv7j-2qjg, MINI-6w2x-gxp6-j985, MINI-78mq-hcqc-7qp4, MINI-7mhf-gm9v-5977, MINI-93hj-mj2j-w975, MINI-9j73-vrhr-fwmf, MINI-9rf5-9658-cvmv, MINI-ch7m-hr9g-4j2x, MINI-g393-m7wp-4654, MINI-mvmp-cv59-j65q, MINI-qpp6-p3j4-jrhm, MINI-w46p-wc82-w87p, MINI-ww7v-qm49-jm43, MINI-x7j9-rh86-h5f8, UBUNTU-CVE-2025-6023

## What is CVE-2025-6023?

CVE-2025-6023 is a high-severity vulnerability in Grafana, published on 18 Jul 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

An open redirect vulnerability has been identified in Grafana OSS that can be exploited to achieve XSS attacks. The vulnerability was introduced in Grafana v11.5.0.

The open redirect can be chained with path traversal vulnerabilities to achieve XSS.

Fixed in versions 12.0.2+security-01, 11.6.3+security-01, 11.5.6+security-01, 11.4.6+security-01 and 11.3.8+security-01

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-601 (URL Redirection to Untrusted Site)

## Which versions are affected by CVE-2025-6023?

4 open source packages ship an affected version, including github.com/grafana/grafana and grafana.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/grafana/grafana` | Go | All versions | None |
| `github.com/grafana/grafana` | Go | All versions | 1.9.2-0.20250521205822-0ba0b99665a9 |
| `github.com/grafana/grafana` | Go | All versions | 1.9.2-0.20250521205822-0ba0b99665a9 |
| `grafana` | Bitnami | From 11.3.0 | 11.6.3, 12.0.2 |

## How do I fix CVE-2025-6023?

Upgrade github.com/grafana/grafana to 1.9.2-0.20250521205822-0ba0b99665a9 or later.

## Is CVE-2025-6023 being exploited?

There is no known exploitation of CVE-2025-6023 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-6023 and fix it if it is affected.

What it is: CVE-2025-6023 is a high-severity vulnerability in Grafana, published on 18 Jul 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-6023 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/grafana/grafana (Go): affected all versions; no fix listed
- github.com/grafana/grafana (Go): affected all versions; fixed in 1.9.2-0.20250521205822-0ba0b99665a9
- github.com/grafana/grafana (Go): affected all versions; fixed in 1.9.2-0.20250521205822-0ba0b99665a9
- grafana (Bitnami): affected from 11.3.0; fixed in 11.6.3, 12.0.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-6023/ (Markdown: https://insights.sbomify.com/CVE-2025-6023/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-6023
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-6023
- OSV: https://osv.dev/vulnerability/CVE-2025-6023

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-6023/
Summaries are generated and may contain mistakes; the official description above is the record.
