T08 · Insecure Dependencies
Warning
- Location
- README.md:7
- Finding
- Unpinned Packages and Mutable Sources Executed Through npx## Vulnerability Details **File Location**: `README.md`, lines 7-17 **Vulnerability Type**: Unpinned third-party dependencies and mutable remote installation sources **Risk Level**: Medium ### Vulnerable Code ```bash npx skills add https://github.com/wpank/Agentic-Uniswap/tree/main/.ai/skills/uniswap-swap-simulation ``` ```bash npx clawhub@latest install uniswap-swap-simulation ``` ### Technical Analysis The documented installation procedures instruct users to download and execute third-party CLI packages through `npx` without pinning them to immutable, reviewed versions. The `clawhub@latest` reference explicitly executes whichever package version currently holds the mutable `latest` tag. The `skills` package is also invoked without an exact version. In addition, the first command installs content from the mutable GitHub `main` branch rather than from a specific commit SHA. Consequently, the code executed by these commands can change after this project has been reviewed. A compromised registry account, malicious package release, altered distribution tag, compromised upstream repository, or unauthorized branch modification could substitute attacker-controlled code without requiring changes to the audited files. ### Attack Path 1. An attacker compromises the maintainer account, package registry account, upstream repository, or publishing pipeline associated with `skills`, `clawhub`, or the referenced GitHub project. 2. The attacker publishes a malicious package version, moves the `latest` tag, or modifies content on the referenced `main` branch. 3. A user follows an installation command from `README.md`. 4. `npx` resolves, downloads, and executes the altered CLI package on the user's system. 5. The malicious installer runs with the privileges of the invoking user and may modify files, access user-readable information, install additional payloads, or alter development tooling. ### Impact Assessment Successful exploitation permits arbitrary code executio ...[truncated 552 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every `npx` CLI dependency to an exact, reviewed version instead of using `@latest` or implicit version resolution: ```bash npx --yes clawhub@X.Y.Z install uniswap-swap-simulation npx --yes skills@X.Y.Z add ... ``` 2. Replace the mutable GitHub branch reference with a reviewed commit SHA or immutable release tag. 3. Publish expected checksums or signatures for downloaded artifacts and verify them before installation. 4. Use package-manager lockfiles where installation occurs within a managed project. 5. Review package provenance, registry ownership, release signatures, and publishing workflows. 6. In CI or other sensitive environments, run installation inside a sandbox or minimally privileged container with restricted credentials, filesystem access, and network access. 7. Avoid executing remotely resolved installers directly when a verifiable download-and-inspect workflow is available.
