# CVE-2025-4123: Grafana Cross-Site-Scripting (XSS) via custom loaded frontend plugin

> Attackers can execute arbitrary JavaScript via XSS or read internal data via SSRF in Grafana, potentially compromising user sessions and sensitive information.

- **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:** 22 May 2025
- **Updated:** 29 Apr 2026
- **Also known as:** ALSA-2025:7893, ALSA-2025:7894, BIT-grafana-2025-4123, GHSA-q53q-gxq9-mgrj, GO-2025-3704, MINI-2h6v-mc85-j229, MINI-3fxc-q25m-38gj, MINI-3wpq-2h2r-qrmm, MINI-4vcm-q2c7-hrvx, MINI-75rj-9888-x963, MINI-7rmx-j6h7-w7cr, MINI-897q-8pvf-c52q, MINI-ggw8-rq29-mw4v, MINI-j6wj-ww4m-x3f6, MINI-mv8q-6c6w-74jg, MINI-pp23-j3c8-6xfw, MINI-ppg9-gm9w-jxc3, MINI-r8j4-gwxq-hwjf, MINI-vc26-x4rr-cm5r, MINI-vr2q-rc2j-48fp, MINI-w5mw-jvxv-j66f, MINI-x483-vp4m-83xp, RHSA-2025:7892, RHSA-2025:7893, RHSA-2025:7894, RHSA-2025:8679, RHSA-2025:8681, RHSA-2025:8683, RHSA-2025:8684, RLSA-2025:7892, RLSA-2025:7893, RLSA-2025:7894, UBUNTU-CVE-2025-4123

## What is CVE-2025-4123?

CVE-2025-4123 is a high-severity cross-site scripting vulnerability in Grafana Grafana, published on 22 May 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

A cross-site scripting (XSS) vulnerability exists in Grafana caused by combining a client path traversal and open redirect. This allows attackers to redirect users to a website that hosts a frontend plugin that will execute arbitrary JavaScript. This vulnerability does not require editor permissions and if anonymous access is enabled, the XSS will work. If the Grafana Image Renderer plugin is installed, it is possible to exploit the open redirect to achieve a full read SSRF.

The default Content-Security-Policy (CSP) in Grafana will block the XSS though the `connect-src` directive.

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-4123?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/grafana/grafana` | Go | All versions | None |
| `github.com/grafana/grafana` | Go | All versions | 0.0.0-20250521183405-c7a690348df7 |
| `github.com/grafana/grafana` | Go | All versions | 0.0.0-20250521183405-c7a690348df7 |
| `grafana` | Bitnami | All versions | 10.4.18, 11.6.1, 12.0.0 |
| `grafana` | AlmaLinux:8 | All versions | 9.2.10-23.el8_10 |
| `grafana-selinux` | AlmaLinux:8 | All versions | 9.2.10-23.el8_10 |
| `grafana` | AlmaLinux:9 | All versions | 10.2.6-13.el9_6 |
| `grafana-selinux` | AlmaLinux:9 | All versions | 10.2.6-13.el9_6 |
| `grafana` | Red Hat:enterprise_linux:10.0 | All versions | 0:10.2.6-17.el10_0 |
| `grafana-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 0:10.2.6-17.el10_0 |
| `grafana-debugsource` | Red Hat:enterprise_linux:10.0 | All versions | 0:10.2.6-17.el10_0 |
| `grafana-selinux` | Red Hat:enterprise_linux:10.0 | All versions | 0:10.2.6-17.el10_0 |
| `grafana` | Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-23.el8_10 |
| `grafana-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-23.el8_10 |
| `grafana-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-23.el8_10 |
| `grafana-selinux` | Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-23.el8_10 |
| `grafana` | Red Hat:enterprise_linux:9::appstream | All versions | 0:10.2.6-13.el9_6 |
| `grafana-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:10.2.6-13.el9_6 |
| `grafana-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:10.2.6-13.el9_6 |
| `grafana-selinux` | Red Hat:enterprise_linux:9::appstream | All versions | 0:10.2.6-13.el9_6 |
| `grafana` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-azure-monitor` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-cloudwatch` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-elasticsearch` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-graphite` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-influxdb` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-loki` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-mssql` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-mysql` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-opentsdb` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-postgres` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-prometheus` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana-stackdriver` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:6.3.6-7.el8_2 |
| `grafana` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:7.3.6-9.el8_4 |
| `grafana-debuginfo` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:7.3.6-9.el8_4 |
| `grafana` | Red Hat:rhel_aus:8.6::appstream | All versions | 0:7.5.11-6.el8_6 |
| `grafana-debuginfo` | Red Hat:rhel_aus:8.6::appstream | All versions | 0:7.5.11-6.el8_6 |
| `grafana` | Red Hat:rhel_e4s:8.6::appstream | All versions | 0:7.5.11-6.el8_6 |
| `grafana-debuginfo` | Red Hat:rhel_e4s:8.6::appstream | All versions | 0:7.5.11-6.el8_6 |

Products: Grafana Grafana.

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

Upgrade github.com/grafana/grafana to 0.0.0-20250521183405-c7a690348df7 or later.

## Is CVE-2025-4123 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-4123 exists.

Public exploit code:

- Script to exploit Grafana CVE-2025-4123: XSS and Full-Read SSRF (github_poc): https://github.com/NightBloodZ/CVE-2025-4123
- CVE-2025-4123 - Grafana Tool (github_poc): https://github.com/ynsmroztas/CVE-2025-4123-Exploit-Tool-Grafana-
- https://github.com/imbas007/CVE-2025-4123-template (github_poc): https://github.com/imbas007/CVE-2025-4123-template
- Grafana CVE-2025-4123-POC (github_poc): https://github.com/ItsNee/Grafana-CVE-2025-4123-POC
- CVE-2025-4123 Grafana Open Redirect Exploit (github_poc): https://github.com/MorphyKutay/CVE-2025-4123-Exploit
- Grafana 11.6.0 - SSRF (exploitdb)

## Other vulnerabilities in Grafana Grafana

- [CVE-2021-43798](https://insights.sbomify.com/CVE-2021-43798/): Grafana Path Traversal (high 7.5, exploited in the wild)
- [CVE-2025-41115](https://insights.sbomify.com/CVE-2025-41115/): Incorrect privilege assignment (critical 10.0)
- [CVE-2022-39328](https://insights.sbomify.com/CVE-2022-39328/): Grafana vulnerable to race condition allowing privilege escalation (critical 9.8)
- [CVE-2022-28660](https://insights.sbomify.com/CVE-2022-28660/): Auth bypass in n/a (critical 9.8)
- [CVE-2022-26148](https://insights.sbomify.com/CVE-2022-26148/): Information disclosure in n/a (critical 9.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2025-4123 is a high-severity cross-site scripting vulnerability in Grafana Grafana, published on 22 May 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: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-4123 exists.

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 0.0.0-20250521183405-c7a690348df7
- github.com/grafana/grafana (Go): affected all versions; fixed in 0.0.0-20250521183405-c7a690348df7
- grafana (Bitnami): affected all versions; fixed in 10.4.18, 11.6.1, 12.0.0

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-4123/ (Markdown: https://insights.sbomify.com/CVE-2025-4123/index.md)
```

## Sources

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

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