Skip to content

AAK-MCP-GRAFANA-CVE-2026-19516-001: Grafana mcp-grafana SSRF via caller-controlled X-Grafana-URL destination (below 1.1.0)

Severity
CRITICAL
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
McpGrafanaXGrafanaUrlSsrf

What it detects

mcp-grafana before 1.1.0 lets a caller-supplied X-Grafana-URL request header control the destination of the server's outbound requests, and the grafana_api_request tool lets the caller also choose the HTTP method, path, and body. Because the destination is not restricted to the configured Grafana instance, a caller can point requests at internal, loopback, and link-local services (including cloud metadata endpoints) and read the responses: server-side request forgery (CVE-2026-19516, CVSS 9.1). This is the incomplete-fix follow-up to CVE-2026-15583, whose fix stopped the configured service-account token from being sent to unintended destinations but did not restrict the destinations themselves, so the correct control is destination restriction, not token handling. mcp-grafana is a Go server but ships a resolvable PyPI wrapper (uvx mcp-grafana), so the pin scanner resolves it from .mcp.json / requirements.txt / pyproject.toml / uv.lock; the archived ledger note that it was unpinnable is now superseded. Fixed in 1.1.0, which restricts the destination to the configured instance.

How to fix

Upgrade mcp-grafana to >= 1.1.0, which restricts outbound requests to the configured Grafana instance. Do not let a caller-controlled X-Grafana-URL header choose the destination, and do not expose grafana_api_request to untrusted callers.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-GRAFANA-CVE-2026-19516-001

Limitations

Reads mcp-grafana in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (services/api/pyproject.toml), in .cursor/mcp.json or .vscode/mcp.json, or in a lockfile format the reader does not parse (pdm.lock). The grafana/mcp-grafana image tag is not read, in a compose file or in an MCP config that starts it with docker run. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-GRAFANA-CVE-2026-19516-001.md: the page then shows that text, with the registry reference appended under it.