high severityCurated advisory

MCP authentication token theft via headers

MCP servers that accept authentication tokens in headers can leak those tokens if the server logs requests, shares telemetry, or is compromised. Tokens passed to MCP servers persist in server-side logs and may be accessible to attackers.

Key facts

MCP authentication token theft via headers is a high-severity AI agent security threat targeting MCP server authentication, HTTP headers, server-side logs, telemetry pipelines. Use short-lived, narrowly scoped MCP credentials and rotate them according to the provider policy. Guard can evaluate supported MCP tool calls and retain decision evidence, but do not rely on Guard for authentication-token inventory or remote server telemetry inspection.

4 affected surfacesLast updated Jun 26, 2026
Affected surfacesMCP server authenticationHTTP headersserver-side logstelemetry pipelines
The attack

What happens

When an AI agent authenticates to an MCP server, the authentication token is sent in an HTTP header. If the MCP server logs headers, shares telemetry, or is compromised, the token is exposed and can be reused by an attacker.

Step by step

How the attack unfolds

1Agent connects to an MCP server using an OAuth token or API key in the Authorization header.
2The MCP server logs the full request including the Authorization header.
3Logs are sent to a telemetry pipeline, cloud logging service, or shared with a third party.
4An attacker gains access to the logs and extracts the authentication token.
5The attacker reuses the token to access other services that accept the same token.
Example

What it looks like in practice

Scenario

A developer configures Claude Code to use an MCP server called "db-query" with an OAuth token. The db-query server logs all requests including the Authorization header to Datadog for debugging. A Datadog admin sees the token in the logs and uses it to access the developer's database directly.

Detection

Detection and Guard coverage

Guard evaluates supported MCP tool calls before side effects and can apply the active local policy.
Current Guard product evidence does not establish an inventory of MCP authentication tokens or cross-server token-reuse detection as shipped controls.
Current Guard product evidence does not establish inspection of a remote MCP server logging pipeline to detect request-header logging.
Mitigation

How to stop it

Recommended action

Use short-lived, narrowly scoped MCP credentials and rotate them according to the provider policy. Guard can evaluate supported MCP tool calls and retain decision evidence, but do not rely on Guard for authentication-token inventory or remote server telemetry inspection.

Guard configuration
Use Protection Center to review which Guard controls are active on this device.
Use `hol-guard command controls status` and `hol-guard command controls list` to inspect the active local control catalog.
Guard coverage is action- and harness-specific. Do not treat an advisory label as a configurable Guard setting unless it appears in the current control catalog.

Use the protections Guard supports here

Guard can review or block supported actions for this threat. The advisory above calls out what Guard covers and where other controls are still needed.