T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:58- Finding
Unpinned Remote Installation Script Is Executed Directly by a Shell
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 58-59
Vulnerability Type:T03: Remote Payload Retrieval and Execution
Risk Level: CriticalComplete Code Snippet:
bash # curl script curl -LsSf https://securityresearch.google/magika/install.sh | shTechnical Analysis
The installation instructions retrieve a mutable shell script from an external URL and immediately pass the response to
sh. The user has no opportunity to inspect the downloaded content, and the command does not pin a version or verify a cryptographic checksum or signature.HTTPS authenticates the serving endpoint under the applicable DNS and certificate trust assumptions, but it does not ensure that the script remains identical to the version considered during this audit. The effective payload can therefore change after publication. The
-sflag also suppresses normal transfer output, reducing visibility during installation.This behavior exceeds the minimum privileges and capabilities necessary for the Skill's declared file-classification functionality. The Skill only needs an installed local
magikaexecutable, and package-manager installation alternatives are already documented.Attack Path
- A user follows the documented curl-based installation instructions.
curlrequests the current contents ofhttps://securityresearch.google/magika/install.sh.- The remote endpoint, its hosting environment, DNS resolution, or another relevant supply-chain component is compromised, or the hosted script is otherwise changed maliciously.
- The malicious response is streamed directly into
shwithout local inspection or integrity verification. - The supplied commands execute with the privileges of the user running the installation command.
Impact Assessment
A malicious response could execute arbitrary shell commands with the invoking user's privileges. Depending on those privileges and the host configura ...[truncated 512 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the pipe-to-shell installation option because it is unnecessary when package-manager alternatives are available.
- Prefer a trusted package manager and pin the dependency to a reviewed version.
- If a remote installation script must be retained:
- Reference an immutable, versioned release artifact.
- Download the script to a local file rather than piping it into a shell.
- Publish and verify a cryptographic checksum or trusted signature.
- Instruct the user to inspect the script before execution.
- Execute it as a separate, explicit step without elevated privileges.
- Avoid quiet download flags in security-sensitive installation instructions so failures and source details remain visible.
