T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:11- Finding
Mutable Remote Python Payload Is Downloaded and Executed Without Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 11–20; subsequent execution is documented at lines 43–58
Vulnerability Type: Remote payload retrieval and execution
Risk Level: CriticalVulnerable Code:
bash SCRIPT_PATH="$HOME/.openclaw/skills/nba_games/nba-schedule.py" if [ ! -f "$SCRIPT_PATH" ]; then mkdir -p "$(dirname "$SCRIPT_PATH")" curl -fsSL \ https://raw.githubusercontent.com/highdeserthacker/nba-schedule/main/nba-schedule.py \ -o "$SCRIPT_PATH" fiThe downloaded file is subsequently executed as follows:
bash # Next 3 upcoming Golden State Warriors games python3 $HOME/.openclaw/skills/nba_games/nba-schedule.py --team-id 9 # Warriors games in the next 2 days only python3 $HOME/.openclaw/skills/nba_games/nba-schedule.py --team-id 9 --days-future 2 # Warriors games in the next 2 days plus yesterday's result python3 $HOME/.openclaw/skills/nba_games/nba-schedule.py --team-id 9 --days-future 2 --days-past 1 # Lakers: next 5 days python3 $HOME/.openclaw/skills/nba_games/nba-schedule.py --team-id 13 --days-future 5Technical Analysis
The installation instructions retrieve a Python program from the mutable
mainbranch of a contributor-controlled GitHub repository. The Skill does not pin the resource to an immutable commit, verify a cryptographic digest or signature, validate the downloaded content, or require a review step before execution.Consequently, the code actually executed can change after the Skill itself has been audited. An attacker who controls or compromises the repository can replace the expected scheduling utility with arbitrary Python code. A fresh installation would download that modified payload, and an ordinary NBA schedule request would execute it through
python3.The
if [ ! -f "$SCRIPT_PATH" ]condition does not mitigate initial compromise. It also causes the unverified payload to remain in persistent Skill storage ...[truncated 1786 chars]- Remediation
View remediation
Remediation Suggestions
- Bundle the reviewed
nba-schedule.pyimplementation inside the Skill artifact so the audited code is the code that executes. - If remote retrieval is unavoidable, pin the download URL to a specific immutable commit rather than
main. - Publish a trusted SHA-256 digest or digital signature with the Skill and verify it before moving the file into place or executing it.
- Fail closed if download, signature, ownership, permission, or integrity verification fails.
- Download into a securely created temporary file, validate it, assign restrictive permissions, and only then atomically install it.
- Review the exact pinned source and restrict its filesystem and network access through sandboxing where supported.
- Prefer a small bundled client that directly queries a documented NBA data endpoint, granting only the network access needed to retrieve schedule information.
- Correct the inconsistent team lookup command at
SKILL.md:37, which refers to/home/node/python/nba-schedule/nba-schedule.pyrather than the documented installed path.
- Bundle the reviewed
