T08 · Insecure Dependencies
Warning
- Location
- package.json:26
- Finding
- Unpinned Third-Party Wallet Package Installation<![CDATA[ ## Vulnerability Details **File Location**: `package.json:26-32`; `SKILL.md:18-25` **Vulnerability Type**: Unpinned executable dependency **Risk Level**: Medium ### Vulnerable Code `package.json:26-32`: ```json { "id": "pipx", "kind": "exec", "label": "Install Nutshell (cashu CLI) via pipx", "command": "pipx install cashu", "detect": "cashu --version" } ``` `SKILL.md:18-25`: ```bash # Recommended (isolated environment) pipx install cashu # Alternative (system/user wide) pip install cashu ``` ### Technical Analysis The installation commands retrieve and execute the current release of the `cashu` package without pinning an exact version or verifying a cryptographic hash or signature. Consequently, the code installed by this skill can change independently of the reviewed project. Although the package name is consistent across the documentation and configuration, this installation model exposes users to upstream account compromise, malicious package publication, and unexpected changes in future releases. Because package installation can execute package build and installation logic, compromise could result in code execution under the account running `pip` or `pipx`. No evidence indicates that the currently referenced package is malicious. The vulnerability is the absence of dependency integrity and version controls. ### Attack Path 1. An attacker compromises the upstream package publisher, distribution account, or package registry. 2. The attacker publishes a malicious release under the expected `cashu` package name. 3. A user or agent installs the skill dependency using `pipx install cashu` or `pip install cashu`. 4. The package manager downloads the attacker-controlled release because no exact version or hash is required. 5. Malicious installation or runtime code executes with the permissions of the installing user. 6. The malicious package may access wallet files, environment variables, tokens, or other data available to that user. ...[truncated 674 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact, reviewed version, for example: ```bash pipx install cashu==<reviewed-version> ``` 2. Validate downloaded artifacts against approved cryptographic hashes or package signatures. 3. Record the reviewed version and authoritative package repository in the skill documentation. 4. Use an isolated environment and avoid system-wide `pip` installation. 5. Make dependency upgrades explicit and subject each new version to security review before changing the pin. 6. Consider using a constraints or lock file with hashes where the installation mechanism supports it. 7. Monitor upstream releases and package ownership changes for signs of supply-chain compromise. ]]>
