Skip to content

AAK-MCP-008: MCP server headersHelper executes arbitrary commands

Severity
CRITICAL
Category
MCP Configuration (mcp-config)
Scanner
agent_audit_kit/scanners/mcp_config.py
Auto-fixable
No.
SARIF name
McpHeadersHelperShellExec

What it detects

The headersHelper field executes arbitrary shell commands to generate headers. A malicious repo can exfiltrate data via header generation.

How to fix

Avoid headersHelper in project-scoped configs. Use static headers or OAuth flows instead.

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

agent-audit-kit scan . --rules AAK-MCP-008

Limitations

Reads the headersHelper field of servers under mcpServers (or servers) in .mcp.json, .cursor/mcp.json, .continue/config.json, .gemini/settings.json and other *mcp*.json files. Servers declared inline in a Claude Code plugin manifest (.claude-plugin/plugin.json) are not read.

References

  • OWASP MCP Top 10: MCP05:2025 (Command Injection & Execution)
  • OWASP Agentic Top 10: ASI05 (Unexpected Code Execution (RCE))
  • Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-03 (Header Injection)

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-008.md: the page then shows that text, with the registry reference appended under it.