Grafana CVE-2025–4123: Full Read SSRF & Account Takeover
An open redirect in Grafana's static file handler could be chained with a client-side path traversal to load a malicious plugin JavaScript file, leading to cross-site scripting and account takeover. The open redirect also enabled a full-read SSRF against internal services via the /render endpoint, though that required authentication and was out of scope.
medium.com
Published on medium.com
https://nightbloodz.github.io/grafana-CVE-2025-4123/
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 the static file handler resolved paths differently for file system access and for HTTP redirects, allowing a crafted path to bypass sanitisation and cause an open redirect, which was then chained with client-side path traversal and unsafe plugin loading.
Impact
An attacker could achieve account takeover by executing JavaScript in a victim's session, and could perform a full-read SSRF against internal services, though the SSRF required authentication and the /render endpoint was not enabled by default.
What the attacker needed
Victim clicks a crafted link; attacker hosts malicious JSON and JS; for SSRF: authenticated user; for SSRF: /render endpoint enabled
How it was found
- Request a path under /public that resolves to a valid directory for the file system but contains a query string to prevent resolution in the redirect.
- Observe the 302 redirect to an attacker-controlled protocol-relative URL.
- Use the open redirect with the /render endpoint to fetch internal services (requires authentication).
- Load a route like /invite/..%2f..%2f..%2f..%2froute to trigger client-side path traversal.
- Use /a/plugin-app/explore with path traversal to load the open redirect, which fetches a malicious JSON from the attacker's server.
- The malicious JSON specifies a JavaScript module URL, which is executed, allowing the attacker to change the victim's email and reset their password.
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.
An open redirect is when a website takes a URL parameter and sends you to another site without checking it, which can be abused. Here, the researcher combined that with a way to make the browser load a malicious script, so an attacker could run code in a victim's session and take over their account. The SSRF part let the server fetch internal pages, but it needed a logged-in user.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.