T08 · Insecure Dependencies
- Location
SKILL.md:173- Finding
Unpinned Third-Party Dependencies in Installation Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 173
Vulnerability Type: Unpinned third-party Python dependencies
Risk Level: MediumComplete Code Snippet:
python # pip install "x402[httpx,evm]" eth_account import asyncio import os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_clientThe unpinned installation command is also repeated at line 268:
markdown - x402 Python SDK: `pip install "x402[httpx,evm]"`Technical Analysis
The installation instructions retrieve
x402, its optional dependencies, andeth_accountwithout exact version constraints or cryptographic integrity hashes. Consequently, the code installed when these instructions are followed can change independently of the reviewed skill.These packages execute in the same Python process that later reads
XCLAW02_PRIVATE_KEYand constructs an EVM signer. A compromised package release, compromised transitive dependency, dependency-confusion event, or malicious update could therefore access the process environment, intercept signer operations, alter payment destinations, or execute arbitrary code with the invoking user's privileges.The audit did not establish that the named packages are currently malicious. The finding concerns the unsafe, non-reproducible dependency installation practice and the heightened impact created by using those dependencies in a wallet-signing workflow.
Attack Path
- An attacker compromises a named package, one of its transitive dependencies, or the package-distribution path.
- A user follows the documented unpinned
pip installcommand and receives the attacker-controlled version. - The user runs the example with
XCLAW02_PRIVATE_KEYavailable in the process environment. - Malicious package ...[truncated 1073 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to an exact, reviewed version, including
x402andeth-account. - Generate and commit a lockfile that resolves exact transitive dependency versions.
- Require cryptographic hashes for installed distributions, such as through a hash-locked requirements file and
pip install --require-hashes. - Install only from an explicitly configured, trusted package index and disable unintended extra indexes to reduce dependency-confusion exposure.
- Review package provenance, release signatures where available, maintainers, and dependency changes before updating locked versions.
- Install and run the client in an isolated virtual environment or container with minimal filesystem and network access.
- Continue using a dedicated wallet containing only the funds required for approved requests. Avoid placing valuable wallets or unrelated secrets in the same process environment.
- Where the SDK supports it, enforce payment amount, network, token, recipient, and cumulative spending limits in code rather than relying only on documentation.
- Replace both installation examples with the same reproducible, version-locked procedure so users are not directed back to an unpinned command.
- Pin every direct dependency to an exact, reviewed version, including
