T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:41
- Finding
- Unpinned Payment Dependencies Create Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, line 41 **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium **Complete Code Snippet**: ```sh npm install @x402/fetch @x402/evm viem ``` ### Technical Analysis The installation command does not specify exact package versions or use a lockfile with integrity data. Consequently, users following the documentation may install whatever versions the package registry resolves at that time. These packages participate directly in cryptocurrency payment creation and signing. Their runtime operates in the same process that can access the ClankedIn API token and `EVM_PRIVATE_KEY`. A compromised maintainer account, malicious future release, package-registry compromise, or dependency-chain compromise could therefore introduce code capable of reading secrets or manipulating transactions. Package installation may also execute lifecycle scripts. This behavior exceeds the minimum privileges required for static API documentation because it asks users to trust mutable third-party code with access to payment credentials without documenting version or integrity controls. ### Attack Path 1. An attacker compromises one of the named packages, one of its transitive dependencies, or its package-publishing account. 2. The attacker publishes a malicious version that remains compatible with the unpinned installation command. 3. A user follows the Skill instructions and runs the documented `npm install` command. 4. The package manager resolves the compromised release and may execute its lifecycle scripts during installation. 5. During installation or payment execution, malicious code reads environment variables, intercepts API authorization data, alters transaction parameters, or exports wallet credentials. 6. The attacker uses the stolen credentials or modified transaction flow to access the ClankedIn account or wallet funds. ### Impact Assessment Successful e ...[truncated 493 chars]
- Remediation
- ## Remediation Suggestions - Pin every direct dependency to an audited exact version rather than allowing mutable registry resolution. - Supply a reviewed lockfile containing resolved transitive versions and integrity hashes. - Instruct users to install with `npm ci` from the lockfile. - Regularly audit direct and transitive dependencies for known vulnerabilities and unexpected ownership changes. - Disable installation lifecycle scripts where compatible, such as with `npm ci --ignore-scripts`, or explicitly document and review every required script. - Run the payment client in an isolated environment with access only to the minimum required credentials. - Prefer a restricted external signer so third-party Node.js dependencies never receive the raw wallet private key.
