T08 · Insecure Dependencies
- Location
SKILL.md:303- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:303
Vulnerability Type: Unpinned npm dependency
Risk Level: MediumVulnerable Code Snippet
markdown | ethers.js | JS library | Optional (required for on-chain verification) | `npm install ethers` |Technical Analysis
The skill instructs the agent to install
etherswithout specifying an exact version, lockfile, or package integrity value. Consequently, npm resolves the package version available through the configured registry at installation time rather than a dependency artifact that was reviewed alongside the skill.This creates a supply-chain risk because the effective code can change after the skill has been audited. If the package, one of its transitive dependencies, a maintainer account, or the configured npm registry is compromised, the installation may introduce malicious code. npm lifecycle scripts may also execute during installation unless explicitly disabled.
This finding does not establish that the legitimate
etherspackage is malicious. The vulnerability is the mutable and insufficiently verified dependency installation procedure.Attack Path
- A user asks the agent to perform the documented on-chain verification workflow.
- The agent determines that the optional
ethers.jsdependency is required. - Following
SKILL.md, the agent executesnpm install ethers. - npm resolves the current package and transitive dependency versions from its configured registry.
- If the resolved package, dependency, maintainer account, or registry response has been compromised, attacker-controlled package content is downloaded.
- Malicious lifecycle scripts may execute during installation, or malicious library code may execute when the verification workflow imports and uses the package.
Impact Assessment
Exploited dependency code would execute with the privileges of the user running the agent or npm command. Depending on t ...[truncated 466 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
ethersto an audited exact version rather than relying on the registry's current release:bash npm install --save-exact ethers@<audited-version> - Commit a reviewed
package.jsonand lockfile containing dependency versions and integrity metadata. - Use
npm ciin automated environments to enforce the lockfile rather than dynamically resolving versions. - Review transitive dependencies and run a dependency vulnerability scan before release.
- Disable lifecycle scripts during installation where the workflow permits:
bash npm ci --ignore-scripts - Use a trusted registry and restrict or verify registry configuration to reduce dependency-confusion and registry-spoofing risks.
- Perform installation and blockchain operations in a sandbox or container with minimal filesystem access, no unnecessary credentials, and restricted network permissions.
- Document the exact reviewed version and an update process requiring security review before changing it.
- Pin
