T08 · Insecure Dependencies
- Location
SKILL.md:51- Finding
Unpinned npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 51
Vulnerability Type: Supply-chain risk caused by an unpinned third-party dependency
Risk Level: MediumVulnerable Code
bash npm install prethereumTechnical Analysis
The installation command does not specify an exact package version or cryptographic integrity value. Consequently, npm resolves whichever version is currently selected by the registry and applicable package metadata at installation time.
The installed artifact may therefore differ from the version reviewed during this audit. If the package publisher account, npm registry entry, or a future package release is compromised, users following this instruction could install attacker-controlled code. npm packages may execute lifecycle scripts during installation, so exploitation may occur without the user explicitly invoking the installed library.
The document pins
@prethereum/mcp@0.1.0elsewhere, but that does not mitigate this separate unpinned installation of theprethereumpackage or risks from unpinned transitive dependencies.Attack Path
- An attacker compromises the
prethereumnpm package, its publisher account, or a future release process. - The attacker publishes a malicious version or introduces a malicious transitive dependency.
- A user follows the documented
npm install prethereuminstruction. - npm resolves and downloads the attacker-controlled release because no exact version or integrity constraint is specified.
- Malicious package lifecycle scripts may execute during installation, or malicious logic may execute when the package is imported.
- The payload runs with the privileges of the user or automation account performing the installation.
Impact Assessment
Successful exploitation could permit arbitrary code execution under the installing user's privileges. Depending on that account's permissions and environment, the attacker could ac ...[truncated 243 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Replace the unversioned command with an exact, reviewed package version, for example:
bash npm install prethereum@<audited-exact-version> --save-exact -
Commit and enforce a lockfile containing registry-resolved integrity hashes.
-
Use
npm cifor reproducible automated installations instead of allowing dependency re-resolution. -
Review the package archive before installation with
npm pack, as already recommended for the MCP package. -
Disable lifecycle scripts with
--ignore-scriptswhen they are not required. If scripts are necessary, inspect them before execution. -
Pin and audit transitive dependencies, monitor package ownership and release changes, and use automated dependency and provenance verification.
-
Perform installation in a least-privileged, isolated environment without unnecessary credentials or sensitive environment variables.
-
