A confused-deputy flaw in the Grafana MCP server lets an unauthenticated attacker steal credentials and pivot to internal services. The fix shipped on July 13. If you ran the server on the network, your token may already be gone.

CVE-2026-15583 | CVSS 8.6 (High) | Published July 15, 2026 | Fixed in v0.17.2


The Vulnerability

The Grafana MCP server has a confused-deputy flaw that hands its own credentials to an attacker. No login required. No user interaction needed. The attack travels over the network and scores high on confidentiality impact. Grafana Labs assigned CVE-2026-15583 on July 15, 2026, with a CVSS 3.1 score of 8.6 (CVE record).

The CVSS vector tells the story: AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N. Network-reachable. Low complexity. No privileges. No user interaction. Scope change. High confidentiality impact. The attacker gets read access to sensitive data beyond the vulnerable component itself (CVE analysis).

How the Attack Works

The Grafana MCP server accepts a per-request Grafana address through the X-Grafana-URL HTTP header. This feature exists for callers who talk to multiple Grafana instances. Before version 0.17.2, supplying that header redirected the server to an attacker-chosen host. The server then attached its configured credentials to the outbound request. Those credentials include the Grafana service-account token, a deprecated API key, basic-auth details, and any extra headers configured on the server (Suriq advisory).

The attacker's server receives all of it. This is the classic confused-deputy problem. A trusted component spends its own privilege on behalf of someone who has none.

Two attacks fall out of this single bug:

  1. Direct credential theft. The attacker walks away with a working Grafana service-account token.
  2. Server-side request forgery (SSRF). The attacker points the server at internal URLs. On a cloud host, the most valuable target is the link-local metadata endpoint at 169.254.169.254, where virtual machine role credentials are served.

The Grafana security advisory confirms both vectors: "A confused-deputy flaw allows an unauthenticated remote attacker to exfiltrate the server's environment-configured Grafana service-account token by supplying a crafted X-Grafana-URL request header. This vulnerability is classified as Server-Side Request Forgery (SSRF) and also enables credentialed SSRF against arbitrary internal services, including cloud metadata endpoints" (Grafana advisory).

The weakness is classified as CWE-610: Externally Controlled Reference to a Resource in Another Sphere.

What Is the Grafana MCP Server?

The Model Context Protocol (MCP) is the emerging standard for connecting AI assistants to external tools and data sources. Grafana's MCP server is the official bridge. Point an AI assistant at it and the assistant can query your Grafana dashboards, alerts, and metrics in plain language. The server holds a Grafana service-account token to authenticate against your Grafana API on the assistant's behalf.

The repository sits at github.com/grafana/mcp-grafana with 3,238 stars, 398 forks, and 114 watchers. It is written in Go and released under Apache 2.0. Docker images are published to docker.io/grafana/mcp-grafana with over 1 million pulls.

That standing credential the server holds is exactly what this flaw gives away.

The Timeline

The release history reveals a hardening sprint on the network-facing surface of this AI bridge:

  • July 7, 2026: Grafana shipped v0.17.1, which blocked DNS-rebinding attacks against the server's HTTP and server-sent-events (SSE) transports.
  • July 13, 2026: Grafana shipped v0.17.2 with the credential-binding fix. The release notes state: "Bind environment-configured credentials to the configured Grafana URL. A URL supplied in the X-Grafana-URL request header no longer causes the environment service-account token, deprecated API key, basic auth, or extra headers to be sent to a caller-specified host."
  • July 15, 2026: The CVE record was published with an 8.6 CVSS score.

Two hardening releases in a week, both targeting the same network-facing surface. This tells you where the soft spots in these AI bridges are.

The fix binds credentials to the Grafana address the server was configured with at startup. A caller-supplied X-Grafana-URL header can no longer redirect those credentials anywhere else.

Are You Exposed?

Affected versions run from the earliest releases through 0.17.1. The fix shipped in 0.17.2 on July 13, 2026.

The attack requires network access to the server's HTTP or SSE transport. If you run the server only as a local process over standard input and output (stdio), a remote attacker has nothing to connect to. That is the usual single-developer setup. The risk applies to deployments that expose the HTTP or SSE transport as a shared, network-listening service.

The exposure is sharpest inside a cloud instance. There, the metadata endpoint sits one hop away from any SSRF. An attacker who can reach your MCP server can probe 169.254.169.254 and walk away with the instance's IAM role credentials.

As of July 15, 2026, no public reports describe active exploitation. No proof-of-concept is circulating. Grafana credits the finding to a researcher through its bug-bounty program. The absence of a public exploit does not mean absence of risk. The attack primitive is simple. The payoff is a live credential. The affected code is open source.

Why Patching Is Not Enough

Upgrading to 0.17.2 stops the next request from stealing anything. It says nothing about the requests that came before it. A stolen Grafana token keeps working until you revoke it. If your server was network-reachable on a vulnerable version, treat the token as potentially exposed.

Four steps, in order:

  1. Upgrade the Grafana MCP server to 0.17.2 or later. This closes the door for new attempts.
  2. Rotate the Grafana service-account token and any API key or basic-auth credential the server was configured with. The patch cannot invalidate a token that already left the building.
  3. Cut exposure. Keep the server on stdio or bound to localhost where possible. Put any HTTP or SSE transport behind authentication and network controls. Restrict egress from the host so it cannot reach the metadata endpoint at all.
  4. Scope the service-account token to least privilege. A read-only, narrowly-scoped token is worth far less to an attacker than an admin one.

Where to Look for Evidence

Three places to check for signs of exploitation:

MCP server access logs or proxy logs. Hunt for X-Grafana-URL header values that point at anything other than your own configured Grafana host. A legitimate caller has no reason to redirect the server elsewhere.

Host outbound connections. Watch for connections to link-local metadata addresses such as 169.254.169.254. The server has no business calling that endpoint. Any such egress is a strong signal.

Grafana audit logs. Look for the service-account token being used from an unfamiliar IP address or at times that do not match your MCP host's activity pattern.

A header-based token leak is invisible unless something is inspecting that traffic.

The Broader Pattern: MCP Servers as Credential Exfiltration Vectors

This is not an isolated bug. It is the third confused-deputy or SSRF flaw to surface in a widely-shared MCP server in recent months.

  • Atlassian MCP server (CVE-2026-27826): A header-driven SSRF in the Atlassian MCP server allowed similar credential redirection.
  • Microsoft MarkItDown MCP server: A reported metadata-theft flaw allowed attackers to reach the cloud metadata endpoint through the server.
  • Grafana MCP server (CVE-2026-15583): The flaw described in this article.

Suriq has documented the same class of trust bug across several MCP-adjacent tools: Appium's MCP server, Docker's MCP gateway, and Amazon Q's MCP configuration.

The pattern is clear. MCP servers exist to bridge an AI assistant to real systems. That means they hold real credentials and take instructions about where to send requests. When a server trusts a caller-supplied destination while carrying its own privileged token, an ordinary SSRF becomes credential theft.

The Structural Problem

MCP servers are connectors by design. They sit between an AI assistant and a backend service. They authenticate to that service with tokens, keys, or basic auth. They accept per-request configuration from callers who may or may not be authenticated themselves.

The OAuth token model assumes the token holder is also the token owner. MCP servers violate that assumption. The server owns the token but the caller directs the request. When the caller can redirect the server to an arbitrary destination, the token travels with the request.

This is not a Grafana-specific problem. It is a design tension in the MCP connector pattern. Any MCP server that holds credentials and accepts caller-supplied endpoint URLs has the same shape of risk. The fix Grafana applied (binding credentials to the configured URL at startup) is one approach. Others include per-caller credential isolation, explicit allow-lists for outbound destinations, and transport-level authentication so only trusted callers can supply per-request configuration.

Grafana's Response

Grafana responded quickly. The v0.17.1 release on July 7 blocked DNS-rebinding attacks. The v0.17.2 release on July 13 fixed the credential exfiltration. The CVE was published on July 15. That is eight days from fix to disclosure. The advisory page on grafana.com provides a clear summary and points to the GitHub repository for the fix.

The changelog also shows that Grafana recently added a GRAFANASERVICEACCOUNTTOKENFILE environment variable to support token rotation from a file. That feature, added in an earlier release, becomes critical now. It lets teams rotate tokens without restarting the server.

What This Means for Teams Running MCP Servers

If you run the Grafana MCP server on stdio for a single developer, you are not remotely exposed. Check anyway. Confirm your deployment does not listen on HTTP or SSE.

If you run the server as a shared service over HTTP or SSE, upgrade to 0.17.2 immediately. Rotate your service-account token. Restrict egress from the host. Scope the new token to read-only access if your use case allows it.

Look at your other MCP servers too. The same confused-deputy pattern exists in any connector that carries credentials to a caller-chosen destination. Audit your Atlassian MCP server. Audit your MarkItDown deployment. Check any MCP server that accepts per-request endpoint configuration.

The MCP ecosystem is growing fast. Connectors are being shipped and deployed at speed. The credentials they hold are real. The attackers who want them are real. Treat every MCP server as a key holder someone will try to walk off with.


References

Published July 17, 2026. Based on research published by Suriq security research on July 16, 2026, and the Grafana Labs security advisory published July 15, 2026.