T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:6- Finding
Unverified Hugging Face CLI Installer Is Executed Directly from the Network
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:6
Vulnerability Type: Remote payload retrieval and execution
Risk Level: CriticalComplete Code Snippet:
markdown Install: `curl -LsSf https://hf.co/cli/install.sh | bash -s`.Technical Analysis
The installation command streams an HTTPS response directly into
bash. The downloaded content is neither pinned to a specific immutable release nor verified with a cryptographic checksum or publisher signature before execution. The-Loption also follows redirects, so the final source that supplies the executed script may differ from the displayed URL.Although
hf.coappears associated with Hugging Face, domain ownership alone does not establish the integrity of the script returned at execution time. The effective payload can change after this Skill has been reviewed. Compromise of the upstream installer, hosting account, redirect destination, release process, or relevant network trust infrastructure could consequently turn this instruction into arbitrary local code execution.Direct shell execution is not the minimum privilege necessary for a documentation-only Skill. The Skill could instead refer users to a pinned package or provide a download-and-verification procedure.
Attack Path
- An attacker compromises or maliciously modifies the remote installer, its hosting infrastructure, or a redirect destination.
- A user or AI agent follows the installation instruction in
SKILL.md. curlretrieves the current network response and follows any server-directed redirects.- The response is passed directly to
bashwithout being saved, reviewed, pinned, or cryptographically verified. - The attacker's commands execute with all permissions held by the invoking account.
- The payload can access local files, credentials, environment variables, configuration, and network resources available to that account.
Impact Assessment
Success ...[truncated 387 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the direct
curl | bashinstallation instruction. - Prefer installation through a trusted package manager with a pinned package version.
- If a script is necessary, pin it to an immutable release artifact rather than a mutable endpoint.
- Download the installer to a local file before execution and display or inspect its contents.
- Publish and verify a SHA-256 checksum and, preferably, a cryptographic publisher signature.
- Disable unexpected redirects or validate the final download origin.
- Require explicit user approval before executing the verified installer.
- Run installation with ordinary user privileges and avoid
sudounless a documented component strictly requires it.
- Remove the direct
