T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:41
- Finding
- Unverified Mutable Executable Download and Privileged System-Wide Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 41–44, 50–52, 58–60, and 430–432 **Vulnerability Type**: Remote payload retrieval, insecure supply-chain dependency, and excessive installation privileges **Risk Level**: High ### Vulnerable Code ```bash curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-aarch64-macos.tar.gz tar xzf obscura-aarch64-macos.tar.gz sudo mv obscura /usr/local/bin/ obscura --version ``` ```bash curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-macos.tar.gz tar xzf obscura-x86_64-macos.tar.gz sudo mv obscura /usr/local/bin/ ``` ```bash curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-linux.tar.gz tar xzf obscura-x86_64-linux.tar.gz sudo mv obscura /usr/local/bin/ ``` The CI installation example repeats the unsafe retrieval pattern: ```yaml curl -L -o /tmp/obscura.tar.gz \ https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-linux.tar.gz tar xzf /tmp/obscura.tar.gz -C /usr/local/bin/ ``` ### Technical Analysis The installation instructions download precompiled executables from a personal GitHub repository through a mutable `releases/latest` URL. They do not pin an audited release version or verify a checksum, cryptographic signature, or trusted provenance before extracting and executing the downloaded content. Because `latest` can resolve to different assets after the Skill has been reviewed, the effective code executed by users can change without any corresponding change to this repository. Compromise of the upstream maintainer account, release workflow, repository, or distribution assets could therefore substitute an attacker-controlled executable. The archive is also extracted without first validating its member paths or expected file list. A malicious archive could potentially contain unexpected files or path-traversal entries. The local installation instructions then u ...[truncated 1779 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin an explicitly reviewed release version rather than using `releases/latest`. 2. Publish trusted SHA-256 checksums and verify the selected asset before extraction. 3. Prefer signed release artifacts and validate signatures against a documented maintainer key. 4. Download into a newly created, permission-restricted temporary directory. 5. List and validate archive members before extraction, rejecting absolute paths, traversal components, links, and unexpected files. 6. Extract into the restricted temporary directory rather than directly into `/usr/local/bin`. 7. Install the verified binary into a user-local directory such as `$HOME/.local/bin`; avoid `sudo` by default. 8. Require explicit user approval before downloading or installing any executable. 9. In CI, use a pinned artifact digest or a trusted package source with provenance verification, and run the binary under a minimally privileged account. 10. Document the exact expected checksum and release identifier in the Skill so reviewers can verify that the executable has not changed. ]]>
