T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:64
- Finding
- Downloaded Stalwart Executable Is Run Without Integrity Verification## Vulnerability Details **File Location**: `SKILL.md:64-72` **Vulnerability Type**: Remote payload retrieval and execution without checksum or signature validation **Risk Level**: High ```bash # macOS ARM64 curl -L -o stalwart.tar.gz "https://github.com/stalwartlabs/stalwart/releases/download/v0.15.5/stalwart-aarch64-apple-darwin.tar.gz" # Linux x86_64 curl -L -o stalwart.tar.gz "https://github.com/stalwartlabs/stalwart/releases/download/v0.15.5/stalwart-x86_64-unknown-linux-gnu.tar.gz" tar -xzf stalwart.tar.gz chmod +x stalwart ./stalwart -c config/config.toml ``` ### Technical Analysis The instructions retrieve a binary archive from the official Stalwart Labs GitHub release location, extract it, mark the resulting file as executable, and immediately run it. Although the source is consistent with the Skill's declared functionality and is not an unrelated paste or personal hosting service, no cryptographic checksum or release signature is verified. HTTPS protects the connection in transit but does not protect users if the upstream project account, release asset, build pipeline, or certificate trust path is compromised. Redirect following through `curl -L` also means the effective download host may differ from the URL initially displayed. ### Attack Path 1. An attacker compromises the upstream release process, repository account, release asset, or another component of the download path. 2. The attacker substitutes a modified archive for one of the documented release artifacts. 3. A user follows the Skill instructions and downloads the modified archive. 4. Because no checksum or signature is checked, extraction and execution proceed normally. 5. The substituted executable runs arbitrary code with all permissions of the invoking account. ### Impact Assessment Successful exploitation provides arbitrary code execution as the user running the installation. The payload could access that user's files and credentia ...[truncated 219 chars]
- Remediation
- ## Remediation Suggestions - Publish a trusted SHA-256 or stronger digest for each supported archive and verify it before extraction. - Prefer verification using a cryptographically signed release manifest whose signing key is distributed through an independent trusted channel. - Use `curl --fail --show-error --location` and stop the installation if the download or verification fails. - Extract into a newly created, permission-restricted directory rather than the current directory. - Run the server under a dedicated unprivileged service account with access only to required mail data and configuration. - Prefer an authenticated official package repository when the vendor provides one. - Document the expected archive contents and avoid running the resulting executable with `sudo` or as root.
