T03 · Remote Payload Retrieval and Execution
Error
- Location
- README.md:20
- Finding
- Unpinned Remote Dependencies Are Retrieved and Executed<![CDATA[ ## Vulnerability Details **File Locations**: - `README.md:20-28` - `README.md:33-34` - `resources.md:27-31` - `resources.md:40-49` - `testing.md:7-12` - `testing.md:36-42` - `smart-contracts.md:366-375` **Vulnerability Type**: Unpinned remote code retrieval and supply-chain exposure **Risk Level**: High ### Vulnerable Code `README.md:20-28`: ```bash npx skills add 0xBreadguy/megaeth-ai-developer-skills ``` ```bash git clone https://github.com/0xBreadguy/megaeth-ai-developer-skills # Copy to your agent's skills directory ``` `README.md:33-34`: ```bash clawdhub install megaeth-developer ``` `resources.md:27-31`: ```markdown - **Skill**: https://clawdhub.ai/planetai87/warren-deploy - **Website**: https://megawarren.xyz - **Install**: `clawdhub install warren-deploy` ``` `resources.md:40-49` and `testing.md:7-12,36-42`: ```bash git clone https://github.com/megaeth-labs/mega-evm cd mega-evm/bin/mega-evme cargo build --release ``` ```bash python scripts/trace_opcode_gas.py trace.json ``` ```markdown **Script:** https://github.com/megaeth-labs/mega-evm/blob/main/scripts/trace_opcode_gas.py ``` `smart-contracts.md:366-375`: ```bash forge install vectorized/solady ``` ```solidity import {ERC6909} from "solady/src/tokens/ERC6909.sol"; ``` ### Technical Analysis The documented installation workflows retrieve mutable content from package registries, Skill repositories, and GitHub branches without pinning an audited version or commit. They also provide no checksum, signature, lockfile, or provenance-verification procedure. The `git clone` and profiler URL alone do not automatically execute code. The risk becomes exploitable when the cloned Rust project is compiled, the Python profiler is run, or an installer such as `npx`, `clawdhub`, or Foundry processes the retrieved package. Build scripts, package lifecycle hooks, procedural macros, transitive dependencies, or Skill installation behavior may then execute under the invoking user's account. The G ...[truncated 1345 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every Git repository to an audited full commit hash rather than the default branch. 2. Pin package and Skill versions; avoid unversioned `npx`, `clawdhub install`, and `forge install` commands. 3. Publish and verify SHA-256 checksums or signed release artifacts. 4. Use lockfiles and review all transitive dependency changes. 5. Prefer release archives from verified organization accounts over mutable source links. 6. Inspect package lifecycle scripts, Rust build scripts, procedural macros, and Skill manifests before execution. 7. Build untrusted tools in an isolated container or sandbox with: - No wallet files mounted - No SSH agent - No cloud or CI credentials - A read-only project mount where possible - Restricted network access 8. Document the exact audited revision of `trace_opcode_gas.py` and invoke that local pinned copy. ]]>
