Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
MediumPublic exploit

Grafana client path traversal and open redirect XSS

IdentifiersCVE-2025-4123CWE-79· Improper Neutralization of Input…

CVE-2025-4123 is a Grafana cross-site scripting vulnerability caused by the combination of a client-side path traversal issue and an open redirect condition. An attacker can craft a Grafana URL that redirects a victim to an attacker-controlled site hosting a malicious frontend plugin, which then executes arbitrary JavaScript in the victim’s Grafana session context. The issue does not require editor permissions to exploit, and the provided content states that if anonymous access is enabled, the XSS will work. The same open redirect path can also be abused for full-read SSRF when the Grafana Image Renderer plugin is installed. The content further notes that Grafana’s default Content-Security-Policy blocks the XSS through the connect-src directive, but the redirect mechanism remains security-relevant and may still be chainable in some deployments.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can lead to arbitrary JavaScript execution in the context of the victim’s Grafana session, enabling session hijacking and account takeover. The content specifically notes that attackers can hijack user sessions, take over accounts, and in some reporting modify account settings such as email addresses and password reset flows. Where the Grafana Image Renderer plugin is installed, the same flaw can be leveraged into full-read SSRF, allowing attacker-induced server-side requests and access to internal or otherwise restricted resources retrievable by the renderer.

Mitigation

If you can’t patch tonight, do this now.

As an interim measure, ensure Grafana’s default Content-Security-Policy remains enforced, as the provided content states the default CSP blocks the XSS via the connect-src directive. Reduce exposure by disabling anonymous access where possible, since the content states the XSS works when anonymous access is enabled. Limit or remove the Grafana Image Renderer plugin if not required to reduce SSRF risk. Users should also be protected from malicious links through URL filtering and monitoring for suspicious redirect patterns targeting Grafana.

Remediation

Patch, then assume compromise.

Upgrade Grafana to a vendor-fixed release containing the patch for CVE-2025-4123. The content states that patched versions were released on 2025-05-21. Organizations should deploy the vendor security update across all exposed Grafana instances and verify that vulnerable branches are no longer in use. If the Grafana Image Renderer plugin is present, prioritize patching because of the additional SSRF exposure.
PUBLIC EXPLOITS

Exploits

3 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (5 hidden).

VALID 3 / 8 TOTALView more in app
Ashwesker-CVE-2025-4123MaturityPoCVerified exploit

This repository provides a proof-of-concept exploit for CVE-2025-4123, a high-severity vulnerability in Grafana (versions 11.2 through 12.0) that enables both Server-Side Request Forgery (SSRF) and Cross-Site Scripting (XSS) attacks. The main file, CVE-2025-4123.py, is a Python Flask application that acts as a malicious server. It serves attacker-controlled JavaScript (for XSS) and JSON (for SSRF) payloads, with the attacker host configurable via command-line argument. The exploit leverages path traversal and open redirect vulnerabilities in Grafana to redirect users or the server to attacker-controlled content. The README.md provides detailed usage instructions, affected versions, and example routes for triggering the XSS and SSRF. The exploit is a POC and requires the attacker to run the Flask server and direct vulnerable Grafana instances to it using crafted URLs. No hardcoded external endpoints are present beyond the default localhost, but the attacker can specify any host. The repository is structured simply, with one Python exploit file and a README.

AshweskerDisclosed Jun 6, 2025pythonnetworkbrowser
CVE-2025-4123MaturityPoCVerified exploit

This repository provides a working exploit for CVE-2025-4123, a high-severity vulnerability in Grafana (versions 11.2 through 12.0) that enables Server-Side Request Forgery (SSRF) and Cross-Site Scripting (XSS). The repository contains a Python server (server.py) that serves attacker-controlled payloads, including a fake plugin manifest (data2.json) and a malicious JavaScript file (js.js). The exploit works by tricking the target Grafana instance into loading a plugin or resource from the attacker's server, which then delivers a JavaScript payload. This payload attempts to change the victim's account details by making an authenticated PUT request to the Grafana API endpoint /api/user, leveraging the victim's session. The server.py script prints out the exact routes to use for XSS and SSRF exploitation, and can be configured to use any attacker-controlled host. The repository is operational and provides all necessary components to demonstrate the exploit in a test environment.

NightBloodZDisclosed May 22, 2025pythonjavascriptnetworkbrowser
CVE-2025-4123-Exploit-Tool-Grafana-MaturityPoCVerified exploit

This repository contains a proof-of-concept Python exploit for CVE-2025-4123, a path traversal vulnerability in Grafana's /public endpoint. The exploit (cve_2025_4123_exploit-mitsec.py) is an interactive CLI tool that allows the user to select between four attack modes: SSRF, LFI, open redirect, and XSS. The tool constructs malicious URLs by encoding traversal sequences and user-supplied input, then sends HTTP requests to the target Grafana instance. The README provides detailed usage instructions and example payloads for each attack type. The code is straightforward, using the requests library to interact with the target and print responses. The main entry point is the Python script, which guides the user through attack selection and payload customization. No hardcoded endpoints are present, but the payloads are constructed to target internal services (e.g., 169.254.169.254 for SSRF), local files (e.g., /etc/passwd for LFI), or inject JavaScript for XSS. The exploit is a functional PoC and does not include advanced payload customization or automation beyond interactive input.

ynsmroztasDisclosed Jun 4, 2025pythonmarkdownnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Grafana LabsGrafanaapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware1

Malware families riding this exploit, with evidence and IOCs.

Detection signatures2

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity34

Community discussion across Reddit, Mastodon, and other social sources.