T08 · Insecure Dependencies
- Location
references/pget.md:5- Finding
Unverified Installation of a Mutable Precompiled Binary
- Content
View full analysis
Vulnerability Details
File Location:
references/pget.md, lines 5–8
Vulnerability Type: Supply-chain risk from an unpinned and unverified executable dependency
Risk Level: MediumVulnerable Code
bash # Linux/macOS binary: sudo curl -o /usr/local/bin/pget -L "https://github.com/replicate/pget/releases/latest/download/pget_$(uname -s)_$(uname -m)" sudo chmod +x /usr/local/bin/pgetTechnical Analysis
The installation instructions retrieve a precompiled executable from GitHub's mutable
latestrelease URL and place it directly in the privileged/usr/local/bindirectory. They neither pin an immutable release version nor verify the downloaded artifact using a cryptographic checksum or signature.Consequently, the code reviewed during this audit does not uniquely determine the executable that users will receive. If the upstream release account, repository, release asset, or redirect target is compromised, the same documented command could install a substituted executable. HTTPS protects transport in normal circumstances but does not establish the integrity or provenance of the release artifact itself.
The command does not immediately execute the downloaded file and the documented GitHub project is not inherently malicious. Therefore, this is an insecure dependency installation process rather than evidence of an intentionally malicious payload.
Attack Path
- An attacker compromises the upstream repository, release workflow, maintainer credentials, or mutable
latestrelease asset. - The attacker replaces the platform-specific
pgetartifact with a malicious executable. - A user follows the documented installation command.
sudo curlwrites the substituted binary to/usr/local/bin/pget.- The second privileged command marks the file executable.
- The user or an agent later invokes
pgetas directed bySKILL.md. - The substituted executable runs with the privileges of ...[truncated 780 chars]
- An attacker compromises the upstream repository, release workflow, maintainer credentials, or mutable
- Remediation
View remediation
Remediation Suggestions
- Pin a specific, reviewed release version rather than using the mutable
latestURL. - Publish checksums through a separately protected release process and verify the selected binary before installation, for example with
sha256sum -c. - Prefer signed artifacts and verify the signature against a documented, pinned maintainer key.
- Use failure-safe download options such as
curl --fail --show-error --location. - Download to a temporary file, validate it, and only then install it atomically.
- Avoid running the network client with
sudo. Download and verify as an unprivileged user, then use a narrowly scoped privileged installation command. - Prefer a user-local executable directory when system-wide installation is unnecessary.
- Document expected artifact names, hashes, signing keys, and a procedure for securely updating pinned versions.
- Pin a specific, reviewed release version rather than using the mutable
