T03 · Remote Payload Retrieval and Execution
- Location
references/pact-implementations.md:407- Finding
Unverified Remote Installer Scripts Are Executed Directly
- Content
View full analysis
Vulnerability Details
File Location:
references/pact-implementations.md, lines 407–414
Vulnerability Type: Remote payload retrieval and immediate execution
Risk Level: CriticalVulnerable Code
bash # Linux/macOS/WSL (recommended: Unified CLI) curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-cli/main/install.sh | sh # Homebrew (macOS/Linux) brew tap pact-foundation/tap brew install pact-foundation/tap/pact # Windows (PowerShell) iwr -useb https://raw.githubusercontent.com/pact-foundation/pact-cli/main/install.ps1 | iexTechnical Analysis
The Unix command pipes content retrieved from a mutable GitHub branch directly into a shell. The PowerShell equivalent downloads a remote script and immediately passes it to
Invoke-Expression. Neither path pins the installer to a reviewed commit or release, verifies a cryptographic checksum, validates a signature, or provides an inspection step.Although the URL belongs to an organization associated with Pact, repository ownership does not eliminate supply-chain risk. Compromise of the repository, maintainer account, default branch, release process, or dependency infrastructure could change the effective payload after this Skill has been audited.
This behavior is not the minimum privilege necessary to install the CLI. A versioned package or separately downloaded and verified release artifact would accomplish the same task without executing mutable network content directly.
Attack Path
- An attacker compromises the upstream repository, a maintainer account, or another part of the content-delivery chain.
- The attacker modifies
install.shorinstall.ps1on the mutablemainbranch. - A user follows the Skill's recommended installation command.
curl | shoriwr | iexexecutes the modified payload without prior review.- The payload runs with all permissions available to the invoking user and can access that ...[truncated 618 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove both direct execution patterns:
curl ... | shiwr ... | iex
- Prefer a trusted package manager with an explicitly pinned version.
- If a standalone installer is required:
- Download a release artifact from a versioned release URL.
- Pin the release version or immutable commit.
- Verify a vendor-published SHA-256 checksum or cryptographic signature.
- Save the script to disk rather than piping it directly to an interpreter.
- Allow the user to inspect the downloaded script before execution.
- Run it without administrator privileges unless a specific privileged operation is required.
- Document the expected files and directories that installation will modify.
- Avoid presenting remote-script execution as the recommended installation method.
- Remove both direct execution patterns:
