CVE-2025-4123: Github.com/grafana/grafana Cross-Site Scripting Vulnerability
HIGHCVE-2025-4123 is a HIGH (CVSS 7.6) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/grafana/grafana libraries in the Go ecosystem. The issue involves grafana cross-site-scripting (xss) via custom loaded frontend plugin. Remediation is available by upgrading affected packages to version 0.0.0-20250521183405-c7a690348df7.
CVE-2025-4123 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L).
How to Fix CVE-2025-4123
To remediate this vulnerability, upgrade all affected Github.com/grafana/grafana dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/grafana/grafana to 0.0.0-20250521183405-c7a690348df7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/grafana/grafana
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-4123, inspect your project dependencies for Github.com/grafana/grafana:
inspect dependencies for github.com/grafana/grafana
Analyze the terminal output to locate any version of Github.com/grafana/grafana in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20250521183405-c7a690348df7), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/grafana/grafana, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-4123 Affected Github.com/grafana/grafana Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/grafana/grafana
|
Go |
< 0.0.0-20250521183405-c7a690348df7
|
0.0.0-20250521183405-c7a690348df7
|
References
Frequently Asked Questions
What is CVE-2025-4123?
Which Github.com/grafana/grafana versions are affected?
What version fixes CVE-2025-4123?
Is github.com/grafana/grafana affected?
What is the CVSS score of CVE-2025-4123?
What CWE is associated with CVE-2025-4123?
How can I check Go dependencies for CVE-2025-4123?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q53q-gxq9-mgrj",
"modified" : "2026-05-06T18:37:38Z",
"published" : "2025-05-22T09:33:21Z",
"aliases" : [ "CVE-2025-4123" ],
"summary" : "Grafana Cross-Site-Scripting (XSS) via custom loaded frontend plugin",
"details" : "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.\n\nThe default Content-Security-Policy (CSP) in Grafana will block the XSS though the `connect-src` directive.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/grafana/grafana"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20250521183405-c7a690348df7"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-4123"
}, {
"type" : "WEB",
"url" : "https://github.com/grafana/grafana/commit/c7a690348df761d41b659224cbc50a46a0c0e4cc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/grafana/grafana"
}, {
"type" : "WEB",
"url" : "https://grafana.com/blog/2025/05/23/grafana-security-release-medium-and-high-severity-security-fixes-for-cve-2025-4123-and-cve-2025-3580"
}, {
"type" : "WEB",
"url" : "https://grafana.com/security/security-advisories/cve-2025-4123"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2025-3702"
}, {
"type" : "WEB",
"url" : "https://www.exploit-db.com/exploits/52491"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-05-22T18:50:43Z",
"nvd_published_at" : "2025-05-22T08:15:52Z"
}
}