CVE-2025–4123 Grafana Open Redirect & SSRF — Full PoC — CVS
A client-side path traversal flaw in Grafana's /public/ static file handler allows an attacker to craft a URL that escapes the intended directory, leading to open redirect, SSRF, or stored XSS. An attacker could redirect victims to malicious sites, access internal services, or execute JavaScript in a victim's browser.
CVE-2025–4123 is a high-severity vulnerability affecting Grafana — the industry-standard open-source observability platform deployed across millions of engineering stacks worldwide. Discovered by security researcher Alvaro Balada via Grafana’s bug bounty program on April 26, 2025, it was publicly disclosed on May 21…
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 did not properly normalise or validate URL-encoded path traversal sequences (such as ..%2F and %5c) before issuing a redirect, allowing escape from the /public/ directory.
Impact
An attacker could redirect users to phishing sites, access internal cloud metadata and APIs if the Image Renderer plugin is installed, or execute JavaScript in a victim's browser if anonymous access is enabled; the open redirect works regardless of authentication settings.
What the attacker needed
Grafana version < 12.0.0-security-01; No authentication required for open redirect; Image Renderer plugin for SSRF; Anonymous access enabled for XSS
The fix
Upgrade Grafana to version 12.0.0-security-01 or later, or to the listed backport versions for older tracks; as a temporary measure, block requests containing encoded backslashes or traversal sequences in the /public/ path and disable anonymous access if not needed.
How it was found
- Find a Grafana instance using FOFA with the Grafana favicon hash.
- Confirm the version via the unauthenticated /api/health endpoint.
- Send a crafted GET request to /public/ with encoded traversal sequences to trigger a 302 redirect.
- Observe the Location header pointing to an external domain, confirming open redirect.
- For SSRF, ensure the Image Renderer plugin is installed and target internal metadata services.
- For XSS, enable anonymous access and craft a URL that executes JavaScript in the victim's browser.
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 monitoring systems. A part of its web server that serves static files could be tricked into treating a specially crafted web address as pointing outside its intended folder. This let an attacker send users to a fake login page, or make the server fetch internal resources, or run malicious code in a victim's browser.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.