T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:32
- Finding
- Remote Sponsor Installer Is Downloaded and Executed Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 32, 129, and 132 **Vulnerability Type**: Remote code retrieval followed by immediate shell execution **Risk Level**: Critical ### Vulnerable Code ```markdown | **6. Sponsor Tier Setup** | **Linux**: `wget -qO- https://vnstocks.com/files/vnstock-cli-installer.run \| bash -s -- --non-interactive --api-key "API_KEY"`<br>**Mac**: `curl -fsSL https://vnstocks.com/files/vnstock-cli-installer.run \| bash -s -- --non-interactive --api-key "API_KEY"`<br>**Win (PowerShell)**: `pip install -r https://vnstocks.com/files/requirements.txt; pip install --extra-index-url https://vnstocks.com/api/simple vnstock_installer; py -m vnstock_installer` | ``` ```bash # Linux wget -qO- https://vnstocks.com/files/vnstock-cli-installer.run | bash -s -- --non-interactive --api-key "USER_API_KEY" --accept # Mac curl -fsSL https://vnstocks.com/files/vnstock-cli-installer.run | bash -s -- --non-interactive --api-key "USER_API_KEY" --accept ``` ### Technical Analysis The installation instructions stream content from a mutable external URL directly into Bash. The downloaded script is not pinned to a version and is not verified using a cryptographic checksum, digital signature, or trusted release manifest. The user and Agent therefore cannot determine whether the executed content matches the content that was originally reviewed. TLS protects the connection in transit but does not protect against compromise of the hosting server, DNS or certificate infrastructure, deployment pipeline, or publisher account. The effective payload can also be replaced legitimately or maliciously after this Skill has been audited. The commands pass the sponsor API key as a command-line argument. Depending on the operating system and execution environment, command-line arguments can be exposed through process inspection, terminal logs, shell history, Agent execution logs, or monitoring systems. This behavior exceeds what is necessary for ...[truncated 1645 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | bash` and `wget | bash` instructions. 2. Publish immutable, versioned installer artifacts through a controlled release process. 3. Download the installer to a temporary file without executing it: ```bash curl -fL -o vnstock-installer.run \ https://vnstocks.com/files/releases/VERSION/vnstock-cli-installer.run ``` 4. Publish the expected SHA-256 digest through a separately protected release manifest and verify it before execution: ```bash printf '%s %s\n' 'PINNED_SHA256' 'vnstock-installer.run' | sha256sum --check - ``` 5. Prefer a verifiable publisher signature over a checksum alone. Pin the signing key and verify the signature locally. 6. Show the artifact path, version, origin, and verification result to the user and require explicit approval before execution. 7. Run the installer without elevated privileges and inside the intended virtual environment. 8. Do not put API keys on the command line. Use protected standard input, an interactive prompt, or a permission-restricted configuration file. 9. Document precisely which files, network endpoints, and commands the installer uses. ]]>
