T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:28
- Finding
- Unpinned Security-Critical Runtime Dependency## Vulnerability Details **File Location**: `SKILL.md`, line 28 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```text Install `ethers` if not present: `npm install ethers` ``` ### Technical Analysis The skill instructs users to install the latest available `ethers` package without specifying an exact version, lockfile, integrity hash, or trusted registry. This dependency is security-critical because the subsequent examples use it to construct a wallet from `AGENTLUX_WALLET_PRIVATE_KEY` and sign authentication challenges. Because `npm install ethers` resolves a mutable package version at installation time, the reviewed skill does not fully determine which code will process the private key. A compromised package release or transitive dependency could execute during installation or when imported by Node.js. An unreviewed update could also introduce incompatible or unsafe behavior. No evidence shows that the current `ethers` package is malicious. The issue is the unsafe, non-reproducible dependency installation practice and its potential supply-chain exposure. ### Attack Path 1. An attacker compromises a future `ethers` release, one of its transitive dependencies, or the package-distribution path. 2. A user follows the prerequisite and runs `npm install ethers`. 3. npm installs the mutable compromised release because no exact version or integrity-controlled lockfile is required. 4. Malicious code may execute through an installation lifecycle script or when the package is imported. 5. The skill's Node.js commands instantiate `ethers.Wallet` using `AGENTLUX_WALLET_PRIVATE_KEY`. 6. The compromised dependency can read or exfiltrate the private key, manipulate signatures, or falsify derived wallet data. ### Impact Assessment Successful exploitation would run with the privileges of the user invoking npm or Node.js. Because the dependency directly processes a Base mainnet private key, compromise c ...[truncated 419 chars]
- Remediation
- ## Remediation Suggestions - Pin `ethers` to an exact, reviewed version rather than resolving the latest release. - Include a committed `package-lock.json` containing integrity metadata. - Replace the installation instruction with `npm ci` so installation follows the reviewed lockfile exactly. - Disable unnecessary npm lifecycle scripts where feasible, for example with `npm ci --ignore-scripts`, after confirming the pinned dependency works without them. - Explicitly configure and document the trusted npm registry. - Review the pinned package and transitive dependency tree before release. - Run wallet signing in a minimal isolated process with no unnecessary network or filesystem access. - Prefer a hardware wallet, external signer, or narrowly scoped wallet with limited funds over exposing a high-value private key to general-purpose package code.
