How One Path Traversal in Grafana Unleashed XSS, Open Redirect and SSRF (CVE-2025–4123)
Grafana's frontend failed to properly normalise URL paths used for plugin loading, allowing encoded path traversal sequences to break out of intended directories. An attacker could craft links that cause open redirects, load malicious JavaScript for XSS leading to account takeover, or force the frontend to request internal URLs for client-side SSRF.
infosecwriteups.com
Published on infosecwriteups.com
A high-severity security vulnerability has been discovered in Grafana, identified as CVE-2025–4123, which combines client path traversal and open redirect issues to enable cross-site scripting (XSS) to account takeover.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely missing strict path validation and normalisation in client-side routing and resource loading, allowing encoded traversal sequences to escape intended directories.
Impact
An attacker could redirect users to malicious sites for phishing or malware, execute JavaScript in the context of Grafana to achieve account takeover, or probe internal services via client-side SSRF.
What the attacker needed
Victim clicks a crafted link; attacker hosts a malicious server
The fix
The Grafana team released a patch in version 11.0.1 that normalises paths, rejects external domains, and escapes embedded strings.
How it was found
- Host a server with a malicious JavaScript file and a crafted plugin.json that points to it.
- Craft a URL containing encoded path traversal that makes Grafana treat the external domain as a local plugin.
- Send the crafted URL to a victim; when opened, Grafana loads and executes the remote JavaScript.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Grafana is a tool for making dashboards. Its web page did not clean up the addresses users typed in, so someone could sneak in a web address that pointed somewhere else. That let an attacker redirect people to a fake site, run harmful code in their browser, or make the page fetch private internal resources.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.