T03 · Remote Payload Retrieval and Execution
- Location
claude-code.py:26- Finding
Quickstart documentation recommends direct execution of mutable remote scripts
- Content
View full analysis
Vulnerability Details
File Location:
claude-code.py, lines 26–33
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighVulnerable Code:
python ### macOS/Linux (curl): ```bash curl -fsSL https://claude.ai/install.sh | bashWindows (PowerShell):
powershell irm https://claude.ai/install.ps1 | iextext ### Technical Analysis The generated quickstart documentation recommends downloading mutable content from remote URLs and immediately passing it to Bash or PowerShell. The downloaded script is not pinned to a version, inspected, authenticated with a publisher signature, or checked against a trusted cryptographic digest before execution. Although the URLs appear associated with the declared Claude product, domain reputation does not eliminate the underlying risk. A compromise of the remote server, CDN, DNS resolution, TLS trust chain, or publishing account could change the effective payload after this Skill has been reviewed. The pipe-to-interpreter construction also prevents users from meaningfully reviewing the complete payload before it begins executing. The Python program does not execute these commands automatically. It displays them when users request the quickstart documentation, such as through `claude-code query quickstart` or `claude-code docs quickstart`. Exploitation therefore requires a user or agent to follow the generated instructions. ### Attack Path 1. A user or AI agent invokes the Skill's quickstart documentation command. 2. The Skill presents one of the remote installation commands as an approved installation method. 3. The user or agent executes the displayed command. 4. Bash or PowerShell begins interpreting the response directly as it arrives. 5. If the remote delivery path has been compromised, attacker-controlled code executes with the privileges of the invoking account. 6. The payload can access or modify resources available t ...[truncated 688 chars]- Remediation
View remediation
Remediation Suggestions
- Remove both pipe-to-interpreter installation commands from the embedded documentation.
- Direct users to an official installation page or signed package manager rather than instructing them to execute mutable network responses.
- If script-based installation is unavoidable:
- Download a versioned artifact to a local file without executing it.
- Pin the expected release version and canonical download URL.
- Verify a publisher signature or compare the artifact against a trusted, hardcoded SHA-256 digest distributed through an independent authenticated channel.
- Ask the user to inspect the downloaded script.
- Execute it only after verification succeeds.
- Avoid silent flags and automatic execution so that download or validation failures remain visible.
- Clearly state what files, network access, and permissions the installer requires before users run it.
