T08 · Insecure Dependencies
- Location
testing.md:19- Finding
Unpinned Third-Party Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
testing.md:19,testing.md:30, andtesting.md:41
Vulnerability Type: Unpinned package installation and supply-chain exposure
Risk Level: MediumVulnerable code snippets:
markdown **Setup**: `cargo add --dev litesvm` or `npm i --save-dev litesvm`markdown **Setup**: `cargo add --dev mollusk-svm`markdown **Setup**: `cargo install surfpool` → `surfpool start`Technical Analysis
The documented commands install third-party packages without pinning exact, reviewed versions. Consequently, package registries determine which package releases are retrieved at execution time. The resulting code may differ from the version available when this Skill was audited.
This creates a supply-chain risk if a package, publisher account, transitive dependency, or newly released package version is compromised. npm packages can execute lifecycle scripts during installation. Cargo dependencies may execute build scripts while being compiled, and
cargo install surfpoolsubsequently produces an executable that the instructions tell the user to run.The finding does not establish that any currently named package is malicious. It identifies the unsafe, mutable dependency-resolution practice.
Attack Path
- An attacker compromises a publisher account, package release process, or relevant transitive dependency.
- The attacker publishes a malicious version under one of the package names referenced by the Skill.
- A user or AI agent follows the unpinned installation instructions.
- The package manager resolves the attacker-controlled release because no reviewed version is specified.
- Malicious npm lifecycle code or Cargo build code executes during installation or compilation.
- In the Surfpool case, the user then explicitly launches the newly installed executable with
surfpool start.
Impact Assessment
Malicious installation or buil ...[truncated 661 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace mutable package specifications with exact versions that have been reviewed and tested.
- Commit generated lockfiles and enforce locked dependency resolution in local development and CI.
- For npm projects, use exact-version saving and
npm ciwith a committedpackage-lock.json. - For Cargo projects, specify reviewed versions and use locked builds or installation options where supported.
- Audit transitive dependencies and review npm lifecycle scripts and Cargo build scripts before adoption.
- Verify package provenance, publisher identity, checksums, signatures, or attestations where the registry and tooling support them.
- Run dependency installation and builds in isolated, least-privileged environments without production secrets.
- Document an upgrade process requiring review and testing before changing pinned versions.
