T03 · Remote Payload Retrieval and Execution
- Location
README.md:32- Finding
Mutable Remote Python Payload Downloaded and Subsequently Executed
- Content
View full analysis
Vulnerability Details
File Location:
README.md:32-44
Vulnerability Type: Unpinned remote payload retrieval and execution
Risk Level: MediumThe installation and quick-start instructions contain the following complete relevant code segment:
bash ## Install # Requires Python 3.8+. No pip install needed. curl -O https://raw.githubusercontent.com/itsPremkumar/agent-health/main/agent_health.py # Or copy the file anywhere — it's self-contained. ## Quick start python agent_health.py self-test # prove it works end-to-end python agent_health.py check --help # check subcommandTechnical Analysis
The documentation instructs users to download executable Python code from the mutable
mainbranch of a personal GitHub repository and then execute the resulting file. The URL is not pinned to an immutable commit or release, and the instructions provide no checksum or signature verification.Consequently, the code executed by a user can differ from the code reviewed in this package. HTTPS protects the connection in transit but does not protect against repository compromise, maintainer-account takeover, malicious upstream changes, or unauthorized modification of the branch.
Remote retrieval is unnecessary for the packaged Skill because an auditable copy of
agent_health.pyis already included. The instruction therefore exceeds the minimum behavior necessary to use the distributed package.Attack Path
- An attacker compromises the upstream repository, the maintainer account, or another mechanism capable of modifying
main/agent_health.py. - The attacker replaces the upstream file with a malicious Python payload.
- A user or automated Agent follows the documented
curl -Oinstallation instruction. - The mutable remote payload is saved locally as
agent_health.py. - The user follows the adjacent quick-start instructions and runs the downloaded file with Python.
- The payload exe ...[truncated 830 chars]
- An attacker compromises the upstream repository, the maintainer account, or another mechanism capable of modifying
- Remediation
View remediation
Remediation Suggestions
- Remove the remote download instruction and direct users to execute the bundled, reviewed
agent_health.py. - If remote distribution is required, use an immutable URL pinned to a reviewed commit rather than the mutable
mainbranch. - Publish an expected SHA-256 digest through a separately protected release channel and require verification before execution.
- Prefer signed release artifacts and document signature verification.
- Harden retrieval with options such as
curl --fail --location --proto '=https'. - Do not place execution instructions immediately after an unverified download.
- Run the utility as an unprivileged account with only the filesystem and network access needed to probe approved endpoints.
- Remove the remote download instruction and direct users to execute the bundled, reviewed
