T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:31
- Finding
- Mutable Remote p4u Executable Download Without Independent Verification## Vulnerability Details **File Location**: `SKILL.md`, lines 31–54 **Vulnerability Type**: Remote executable retrieval through a mutable release channel **Risk Level**: High The Skill instructs users to download a precompiled `p4u` executable from the personal GitHub repository identified in `_meta.json` as belonging to `m9rco`. The downloaded executable is subsequently installed into a PATH directory. ```bash BASE="https://github.com/m9rco/p4u-skill/releases/download/nightly" curl -fsSL "${BASE}/p4u-${OS}-${ARCH}" -o /tmp/p4u curl -fsSL "${BASE}/checksums.txt" -o /tmp/p4u-checksums.txt # Verify integrity before installing (works on both macOS and Linux) EXPECTED=$(grep "p4u-${OS}-${ARCH}" /tmp/p4u-checksums.txt | awk '{print $1}') ACTUAL=$(command -v sha256sum >/dev/null 2>&1 && sha256sum /tmp/p4u | awk '{print $1}' || shasum -a 256 /tmp/p4u | awk '{print $1}') [ "$EXPECTED" = "$ACTUAL" ] || { echo "Checksum mismatch — aborting"; rm -f /tmp/p4u; exit 1; } chmod +x /tmp/p4u && sudo mv /tmp/p4u /usr/local/bin/p4u ``` ```powershell Invoke-WebRequest -Uri "https://github.com/m9rco/p4u-skill/releases/download/nightly/p4u-windows-amd64.exe" ` -OutFile "$env:USERPROFILE\AppData\Local\Microsoft\WindowsApps\p4u.exe" ``` ### Technical Analysis The `nightly` release reference is mutable, so the executable delivered to a user can change after the Skill has been reviewed. No source code for the binary is present in the audited package, preventing the downloaded implementation from being inspected as part of this audit. On Windows, the executable is downloaded directly into a user PATH directory without checksum, digital-signature, or provenance verification. On macOS and Linux, a SHA-256 comparison is performed, but `checksums.txt` is retrieved from the same mutable release and administrative trust boundary as the executable. An attacker able to replace the binary can therefore replace its checksum as we ...[truncated 1648 chars]
- Remediation
- ## Remediation Suggestions 1. Publish the complete, reproducible source code for `p4u` so the executable behavior can be audited. 2. Replace the mutable `nightly` reference with an immutable, versioned release. 3. Pin expected SHA-256 digests directly in the reviewed Skill or another independently controlled, immutable trust channel. 4. Do not rely on a checksum downloaded from the same release location as the artifact. 5. Add equivalent integrity verification on Windows and validate an Authenticode signature from an expected publisher. 6. Sign release artifacts and verify signatures or supply-chain attestations before installation. 7. Prefer installation into a user-scoped directory unless system-wide availability is explicitly required. 8. Continue requiring the user to approve installation, and display the pinned version, digest, publisher, and destination before proceeding.
