T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:112
- Finding
- Mutable FFmpeg Release Is Installed System-Wide Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:112-119` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash ### Install Optimized ffmpeg System ffmpeg lacks NVENC. Use BtbN static build: ```bash cd /tmp wget https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz tar xf ffmpeg-master-latest-linux64-gpl.tar.xz sudo cp ffmpeg-master-latest-linux64-gpl/bin/* /usr/local/bin/ ffmpeg -version | grep libsvtav1 # Verify AV1 support ``` ### Technical Analysis The instructions retrieve a precompiled executable archive through the mutable `latest` release URL. They do not pin a release version, verify a cryptographic checksum, or validate a release signature. Consequently, the effective binaries installed by the instructions can change after the Skill has been reviewed. The extracted executables are copied with `sudo` into `/usr/local/bin`, a system-wide executable search location. This can replace existing tools or introduce additional executable files. The subsequent `ffmpeg -version` command then executes the installed binary. Downloading FFmpeg is relevant to the declared video-processing functionality, but using an unpinned artifact and installing every archive binary system-wide exceeds the minimum privilege required. A private application directory containing only the required binaries would be sufficient. ### Attack Path 1. An attacker compromises the upstream release account, build pipeline, or mutable `latest` release artifact. 2. The attacker publishes an archive containing a modified `ffmpeg` binary or additional malicious executables. 3. A user follows the Skill and downloads the changed archive without checksum or signature validation. 4. `sudo cp ... /usr/local/bin/` installs the attacker-controlled files into a privileged system-wide path. 5. The verification command or later miner processing executes the malicious binary. 6 ...[truncated 580 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin FFmpeg to a specific, immutable release version rather than `latest`. 2. Publish the expected SHA-256 digest in the Skill and verify it before extraction: ```bash echo '<EXPECTED_SHA256> ffmpeg-release.tar.xz' | sha256sum --check - ``` 3. Prefer upstream signature verification where signed artifacts are available. 4. Download with failure handling and secure transport settings, such as `curl --fail --location --proto '=https'`. 5. Extract into a newly created application-owned directory rather than a shared `/tmp` path. 6. Install only the required `ffmpeg` and `ffprobe` files under a dedicated versioned directory, such as `/opt/vidaio/ffmpeg/<version>/bin`. 7. Run the miner under a dedicated unprivileged account and reference the binaries through an explicit absolute path. 8. Do not copy every file from an externally supplied `bin` directory into `/usr/local/bin`. ]]>
