T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:13- Finding
Unverified Remote Installation Script Executed Directly by a Shell
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 13
Vulnerability Type:T03: Remote Payload Retrieval and Execution
Risk Level: HighVulnerable Code:
markdown - **Install** (script): `curl -sSL https://raw.githubusercontent.com/fiatjaf/nak/master/install.sh | sh`Technical Analysis
The installation command retrieves a shell script from the mutable
masterbranch of an external personal GitHub repository and immediately pipes the response intosh. The downloaded content is not pinned to a reviewed commit or release and is not authenticated with a publisher signature or verified against a checksum.Consequently, the code executed during installation can change after the Skill itself has been reviewed. The remote script is not included in the audited project, so its behavior and any files, commands, or secondary payloads it uses cannot be verified by this audit. The optional recommendation elsewhere in the document to review the script does not make the displayed installation command safe.
The documented update procedure also instructs users to rerun this command to install the latest version, repeatedly exposing them to mutable remote code. Although installing
naksupports the Skill's declared functionality, direct unverified execution is not the least-privilege or minimum-risk way to provide that dependency.Attack Path
- An agent or user follows the installation or update instructions in
SKILL.md. curlrequests the currentinstall.shcontent from the repository's mutablemasterbranch.- An attacker who compromises the repository, maintainer account, delivery path, or installation script substitutes malicious shell commands.
- The response is passed directly to
shwithout local inspection, version pinning, checksum verification, or signature validation. - The malicious commands execute with the permissions of the user or agent running the installation.
- Th ...[truncated 858 chars]
- An agent or user follows the installation or update instructions in
- Remediation
View remediation
Remediation Suggestions
- Remove the
curl | shinstallation pattern. - Pin installation to a specific audited release, immutable commit, or versioned artifact rather than the mutable
masterbranch. - Download the artifact to a local file before execution so it can be inspected:
bash curl --fail --show-error --location --output install.sh \ "https://raw.githubusercontent.com/fiatjaf/nak/<PINNED_COMMIT>/install.sh" - Publish and verify a trusted SHA-256 checksum and, preferably, a cryptographic publisher signature before running the downloaded file.
- Review the downloaded script and its secondary downloads, then execute it explicitly only after verification.
- Prefer a trusted, version-pinned package manager or signed release binary when the upstream project provides one.
- Perform installation in a restricted environment without
NOSTR_SECRET_KEYor unrelated credentials in scope. - Do not request elevated privileges unless a reviewed installation step demonstrably requires them. Install to a user-controlled directory where possible.
- Document an explicit, version-pinned update process that repeats all integrity and authenticity checks rather than automatically installing the latest mutable content.
- Remove the
