T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:67- Finding
Unverified Mutable Executable Is Downloaded and Preferentially Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:67;scripts/download_audio.sh:19-20; related cookie handling atscripts/download_audio.sh:31-36
Vulnerability Type: Remote payload retrieval and execution without integrity verification
Risk Level: MediumVulnerable Code
SKILL.md:67:bash curl -sL https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /tmp/yt-dlp && chmod +x /tmp/yt-dlpscripts/download_audio.sh:19-20:bash if [[ -x "/tmp/yt-dlp" ]]; then YT_DLP="/tmp/yt-dlp"Related sensitive cookie access at
scripts/download_audio.sh:31-36:bash if [[ -n "$COOKIES" && -f "$COOKIES" ]]; then COOKIE_ARGS=(--cookies "$COOKIES") elif [[ -n "$COOKIES" && "$COOKIES" == browser:* ]]; then # e.g. COOKIES="browser:chrome" BROWSER="${COOKIES#browser:}" COOKIE_ARGS=(--cookies-from-browser "$BROWSER") fiTechnical Analysis
The documented recovery procedure retrieves the mutable
latestrelease ofyt-dlp, writes it to/tmp/yt-dlp, marks it executable, and performs no checksum or signature verification. The download script then gives this temporary executable priority over both the systemPATHand the packaged virtual-environment installation.This creates a remote payload execution and local tool-substitution boundary: the effective code executed by the Skill can change after review. Because
/tmpis conventionally a shared temporary location, trusting a fixed path there also risks executing a file placed or replaced by another local process where filesystem permissions and host configuration permit it.The official GitHub release URL and HTTPS reduce routine interception risk, and the reviewed code does not establish malicious intent. They do not, however, provide artifact pinning or independent integrity validation. The risk becomes more consequential when the optional browser-cookie mode is used, becau ...[truncated 1785 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
yt-dlpto a reviewed, explicit release version rather than using the mutablelatestURL. - Obtain the expected SHA-256 digest through a trusted release process and verify it before making the file executable or invoking it. Abort on any mismatch.
- Where upstream signing is available, verify the release signature using a pinned and trusted signing key.
- Prefer an operating-system package, locked dependency, or pre-provisioned binary managed by the deployment process instead of downloading executable code during Skill operation.
- Do not preferentially execute a fixed binary from
/tmp. Store managed executables in a directory owned by the Agent account or administrator and not writable by other users. - If temporary storage is unavoidable, create a private directory with restrictive permissions, use collision-resistant paths, verify ownership and file type, and reject symbolic links or unexpected pre-existing files.
- Remove the
/tmp/yt-dlpprecedence rule or validate the file's ownership, permissions, version, and digest before selecting it. - Treat browser-cookie access as sensitive: require explicit user approval, warn about the exposure risk, and prefer a narrowly scoped exported cookie file over access to an entire browser profile.
- Execute the downloader with the minimum required filesystem and network privileges, ideally in a sandbox that cannot access unrelated credentials or user data.
- Pin
