T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:31- Finding
Mutable Remote p4u Executable Download Without Independent Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 31–54
Vulnerability Type: Remote executable retrieval through a mutable release channel
Risk Level: HighThe Skill instructs users to download a precompiled
p4uexecutable from the personal GitHub repository identified in_meta.jsonas belonging tom9rco. 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/p4upowershell 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
nightlyrelease 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.txtis 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
View remediation
Remediation Suggestions
- Publish the complete, reproducible source code for
p4uso the executable behavior can be audited. - Replace the mutable
nightlyreference with an immutable, versioned release. - Pin expected SHA-256 digests directly in the reviewed Skill or another independently controlled, immutable trust channel.
- Do not rely on a checksum downloaded from the same release location as the artifact.
- Add equivalent integrity verification on Windows and validate an Authenticode signature from an expected publisher.
- Sign release artifacts and verify signatures or supply-chain attestations before installation.
- Prefer installation into a user-scoped directory unless system-wide availability is explicitly required.
- Continue requiring the user to approve installation, and display the pinned version, digest, publisher, and destination before proceeding.
- Publish the complete, reproducible source code for
