T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:24
- Finding
- Unverified Remote Installer Is Downloaded and Executed Directly<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:21-25` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash ### One-click install ```bash bash <(curl -s https://raw.githubusercontent.com/xx235300/BaiduOCR-LocalFallback/main/install.sh) ``` ``` ### Technical Analysis The documented installation command downloads a shell script from a mutable `main` branch in a personal GitHub repository and immediately executes it with Bash. It does not pin the payload to an immutable commit, verify a cryptographic checksum or signature, preserve the downloaded file for inspection, or cause `curl` to fail explicitly on HTTP errors. The remotely retrieved script is the effective executable payload. It can change independently after this packaged skill has been reviewed, meaning the local `install.sh` is not necessarily the code users will execute. Compromise of the repository, GitHub account, or upstream content can therefore turn this installation command into an arbitrary-code execution channel. This behavior exceeds the minimum privilege necessary to install the supplied skill. A safer installation process can execute the reviewed local installer or retrieve a versioned artifact and verify it before execution. ### Attack Path 1. A user follows the one-click installation instructions in `SKILL.md`. 2. Bash starts process substitution and `curl` retrieves the current contents of the upstream `main/install.sh`. 3. An attacker who has compromised the repository or maintainer account modifies that remote installer. 4. The modified payload is supplied directly to Bash without integrity or authenticity verification. 5. The attacker-controlled commands execute with all privileges of the user running the installation command. ### Impact Assessment Successful exploitation permits arbitrary command execution under the invoking user's account. The payload could read user-accessible files and credent ...[truncated 459 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the pipe-to-shell installation command and direct users to the installer included in the reviewed package: ```bash bash ./install.sh ``` 2. If remote retrieval is unavoidable, publish immutable, versioned release artifacts rather than using the mutable `main` branch. 3. Pin downloads to a reviewed commit or release and publish a SHA-256 or stronger digest. 4. Download the artifact to a local file, verify its checksum or cryptographic signature, allow inspection, and only then execute it. 5. Use strict download options such as `curl --fail --show-error --location` so HTTP failures are not silently passed to Bash. 6. Document that the installer must not be run as root and ensure it refuses unnecessary elevated execution. 7. Ensure the reviewed package includes all required OCR implementation files so installation does not depend on obtaining unreviewed executable content elsewhere. ]]>
