AAK-MCP-006: MCP server command uses relative path
- Severity
- MEDIUM
- Category
- MCP Configuration (
mcp-config) - Scanner
agent_audit_kit/scanners/mcp_config.py- Auto-fixable
- No.
- SARIF name
McpCommandRelativePath
What it detects
The command uses a relative path that can be hijacked via PATH manipulation.
How to fix
Use absolute paths for MCP server executables.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-006
Limitations
Fires on a command that is not an absolute path, except for a fixed list of common launchers (node, python, python3, npx, uvx, bunx, pnpx, docker, deno, bun, cargo, go, java, ruby). Those are resolved through PATH in the same way and are never reported.
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-02 (Path Manipulation)
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-006.md: the page then shows that text, with the registry reference appended under it.