T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:14- Finding
Unpinned Remote Executable Download Without Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14–26
Vulnerability Type: Remote payload retrieval and execution
Risk Level: Mediumbash # From a directory on your PATH or the skill directory LATEST_URL=$(curl -sL -o /dev/null -w '%{url_effective}' https://github.com/craftslab/gomail/releases/latest) VERSION=${LATEST_URL##*/} # e.g. v2.7.2 VERSION_NO_V=${VERSION#v} # e.g. 2.7.2 # Note: the release tag includes a leading "v", but the tarball filename does not. wget "https://github.com/craftslab/gomail/releases/download/${VERSION}/gomail_${VERSION_NO_V}_linux_amd64.tar.gz" tar -xf "gomail_${VERSION_NO_V}_linux_amd64.tar.gz" # Ensure the binaries are executable chmod +x sender parserTechnical Analysis
The installation procedure dynamically resolves the latest release and downloads a precompiled archive from an external GitHub repository. It neither pins a previously reviewed version nor verifies the archive using a cryptographic digest or trusted signature before extracting it and making its binaries executable.
Consequently, the effective executable payload may change after the Skill itself has been reviewed. A compromise of the upstream repository, maintainer account, release workflow, or hosted artifact could cause users to retrieve and execute attacker-controlled code. TLS protects the download in transit but does not establish that the release artifact is the specific artifact reviewed or approved by the Skill publisher.
Downloading a binary is functionally necessary because the Skill delegates email delivery to the
senderCLI. However, dynamically selecting an unverified latest release exceeds the minimum risk necessary to provide that functionality. In addition,chmod +x sender parsergrants execution permission toparser, although the declared workflow only requiressender. The downloaded archive was not included in the audited project, so its internal beha ...[truncated 1479 chars]- Remediation
View remediation
Remediation Suggestions
- Pin an explicitly reviewed release version rather than resolving
/releases/latestduring installation. - Publish an expected SHA-256 or stronger digest in the Skill and verify the downloaded archive before extraction. Abort installation on any mismatch.
- Where available, verify a signed release or provenance attestation against a documented, trusted maintainer key or identity.
- Prefer building the executable from a pinned source revision in a controlled and reproducible build environment.
- Download and extract into a dedicated, non-privileged directory. Avoid running installation steps as root unless installation to a protected path is strictly required.
- Inspect the archive contents before extraction and use defensive extraction controls to prevent unexpected paths or files from being written.
- Install and grant execution permission only to the required
senderbinary. Do not markparserexecutable unless a documented workflow genuinely requires it. - Document the exact reviewed source revision, release version, artifact name, checksum, architecture, and verification procedure.
- Run the email client with least privilege and limit its filesystem access to the required configuration, message body, and explicitly selected attachments.
- Pin an explicitly reviewed release version rather than resolving
