AAK-MCP-APIFY-CVE-2026-46341-001: Apify MCP host-validation defects: docs-allowlist SSRF and Actor path-authority token leak (@apify/actors-mcp-server below 0.10.11)
- Severity
- HIGH
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
ApifyMcpDocsAllowlistSsrf
What it detects
Two defects in the Apify MCP server (@apify/actors-mcp-server), both of them a host check that trusts a string instead of a parsed origin. Before 0.9.21 the fetch-apify-docs allowlist is validated with String.startsWith() rather than hostname comparison, so attacker URLs such as https://docs.apify.com.evil.com/ or https://docs.apify.com@evil.com/ pass the ALLOWED_DOC_DOMAINS check and return arbitrary fetched content to the LLM (CVE-2026-46341, CVSS 6.1, SSRF). Before 0.10.11 getActorMCPServerURL in src/mcp/actors.ts concatenates the trusted Actor standby URL with the Actor-supplied webServerMcpPath without re-checking the resulting origin, so a userinfo-style authority (@evil.host) in a malicious Actor definition redirects connectMCPClient to a third-party host — and the call-actor, fetch-actor-details and actor-mcp paths hand that URL to transports in src/mcp/client.ts that attach the victim's Authorization bearer token, disclosing the Apify API token and with it access to Actors, stored datasets and billable compute (CVE-2026-50143, CVSS 8.1, CWE-918). Exploiting the second requires only that the victim invoke or inspect the attacker-published Actor. The floor is the later of the two: treat < 0.10.11 (and unpinned) as exposed.
How to fix
Upgrade @apify/actors-mcp-server to >= 0.10.11 and pin it. Allow-list by parsed URL hostname (exact / suffix match), never startsWith on the raw URL, and re-parse any URL built from a partly-untrusted path before attaching credentials to it — comparing the parsed origin against the expected one is what catches a userinfo authority that string concatenation does not.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-APIFY-CVE-2026-46341-001
Limitations
Reads @apify/actors-mcp-server in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (packages/app/package.json), in .cursor/mcp.json or .vscode/mcp.json, or in a lockfile format the reader does not parse (a Yarn 2+ yarn.lock). A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-46341, CVE-2026-50143
- OWASP MCP Top 10: MCP01:2025 (Token Mismanagement & Secret Exposure), MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP05:2025 (Command Injection & Execution)
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-SSRF-01 (Internal Network MCP)
- CSA AI Controls Matrix (AICM): IVS-04, STA-08
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-APIFY-CVE-2026-46341-001.md: the page then shows that text, with the registry reference appended under it.