Skip to content

AAK-MCP-005: MCP server uses npx/uvx to fetch and execute remote packages

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

What it detects

The command uses npx, uvx, bunx, or pnpx which fetches the latest version from a registry at runtime, vulnerable to typosquatting and dependency confusion.

How to fix

Install the server ahead of time at a fixed version and point command at the installed program (for example node with the path to its entry file), so nothing is downloaded when the client starts. Pinning a version in args (AAK-MCP-007) lowers the risk but does not clear this rule, which fires on npx, uvx, bunx or pnpx as the command.

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

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

Limitations

Fires when the first word of command is npx, uvx, bunx or pnpx. The same fetch through another launcher is not matched: pnpm dlx, pipx run, cmd /c npx, or an absolute path such as /usr/local/bin/npx.

References

  • OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering)
  • OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities)
  • Adversa AI MCP Top 25 (AAK-defined ids): ADV-SUPPLY-01 (Runtime Package Fetch)

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