Skip to main content

CVE-2025-4123: CWE-79 in Grafana Grafana

High
VulnerabilityCVE-2025-4123cvecve-2025-4123cwe-79cwe-601
Published: Thu May 22 2025 (05/22/2025, 07:44:09 UTC)
Source: CVE
Vendor/Project: Grafana
Product: Grafana

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.

AI-Powered Analysis

AILast updated: 07/07/2025, 10:58:32 UTC

Technical Analysis

CVE-2025-4123 is a high-severity vulnerability affecting Grafana, a widely used open-source platform for monitoring and observability. The vulnerability is a cross-site scripting (XSS) issue (CWE-79) combined with a client-side path traversal and an open redirect (CWE-601). This combination allows an attacker to redirect users to a malicious website hosting a frontend plugin that executes arbitrary JavaScript code in the context of the victim's browser session. Notably, exploitation does not require editor permissions, and if anonymous access is enabled on the Grafana instance, the XSS attack can be triggered without any authentication. Furthermore, if the Grafana Image Renderer plugin is installed, the open redirect can be leveraged to perform a full read Server-Side Request Forgery (SSRF), potentially allowing attackers to access internal resources or sensitive data. The default Content-Security-Policy (CSP) in Grafana includes a 'connect-src' directive that mitigates the XSS attack vector by restricting allowed sources for connections, but this protection may be bypassed or misconfigured in some deployments. The vulnerability affects multiple recent versions of Grafana, specifically versions 10.4.18+security-01 through 12.0.0+security-01, indicating that it impacts a broad range of currently supported releases. The CVSS v3.1 score is 7.6, reflecting high severity due to network attack vector, low attack complexity, no privileges required, user interaction needed, and high confidentiality impact with limited integrity and availability impacts. No known exploits are currently reported in the wild, but the potential for exploitation is significant given the ease of triggering the XSS and SSRF vectors.

Potential Impact

For European organizations, this vulnerability poses a significant risk, especially for those relying on Grafana for critical monitoring and observability functions in IT infrastructure, industrial control systems, and cloud environments. Successful exploitation can lead to session hijacking, credential theft, or execution of malicious scripts that compromise user data confidentiality. The SSRF capability, when combined with the Image Renderer plugin, can allow attackers to pivot into internal networks, potentially accessing sensitive internal services, databases, or configuration endpoints that are not exposed externally. This could lead to data breaches, disruption of monitoring capabilities, and lateral movement within corporate networks. Organizations with anonymous access enabled or misconfigured CSP policies are particularly vulnerable. Given Grafana’s popularity in sectors such as finance, manufacturing, and telecommunications across Europe, the impact could extend to critical infrastructure monitoring and operational technology environments, increasing the risk of espionage or sabotage. The requirement for user interaction (clicking a crafted link) means phishing campaigns could be used to target employees or administrators, amplifying the threat.

Mitigation Recommendations

European organizations should immediately audit their Grafana deployments to identify affected versions and configurations. Specific mitigations include: 1) Upgrade Grafana to the latest patched version beyond 12.0.0+security-01 once available or apply vendor-supplied patches addressing CVE-2025-4123. 2) Disable anonymous access unless absolutely necessary, and if enabled, restrict it with strict access controls and monitoring. 3) Review and harden Content-Security-Policy settings, ensuring 'connect-src' and other directives are properly configured to block unauthorized script execution and redirects. 4) If the Grafana Image Renderer plugin is installed, consider disabling it temporarily or restricting its usage until patched, as it increases SSRF risk. 5) Implement user awareness training to recognize phishing attempts that could exploit this vulnerability. 6) Monitor Grafana logs for suspicious redirect or plugin loading activities indicative of exploitation attempts. 7) Employ web application firewalls (WAFs) with rules targeting known XSS and open redirect patterns specific to Grafana. 8) Conduct internal penetration testing focusing on this vulnerability to validate mitigations and detect residual risks.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GRAFANA
Date Reserved
2025-04-30T06:59:15.172Z
Cisa Enriched
false
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682edeb90acd01a249256ff5

Added to database: 5/22/2025, 8:22:17 AM

Last enriched: 7/7/2025, 10:58:32 AM

Last updated: 8/14/2025, 2:29:25 PM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats