Over 10% of MCP Servers Leak Sensitive Data

Inevitable_Fee1895 · reddit · 2026-07-16

A paper published last month conducted static analysis on 10,655 MCP server repositories, revealing that over 10% leak credentials, API keys, or PII via tool responses.

The critical point is that these leaks don't occur during network calls, but within the return values of tool handler functions. Examples include passing back raw stack traces during exception handling, embedding debug logs into responses, or returning environment variables verbatim for "context". Because the data is returned from local functions into the model's context, traditional SAST/DAST tools—which primarily monitor network egress—fail to detect this sink.

The author argues this isn't a standard error-handling bug, but an entirely new attack surface introduced by the MCP protocol. Teams integrating MCP with sensitive systems must urgently audit failure paths and handler return contents.

Original post →

More from Safety

Safety channel →