T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Execution of an Unpinned Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 20
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code:
bash npx @morpho-org/cli <command> [options]Technical Analysis
The Skill instructs the agent to execute
@morpho-org/clithroughnpxwithout specifying an exact package version. The project does not include a lockfile, integrity hash, vendored implementation, or other mechanism that binds execution to the version reviewed during this audit.When a suitable local package is unavailable,
npxmay resolve and download the package from the npm registry. The code ultimately executed can therefore change after the Skill has been audited. A compromised maintainer account, malicious package release, registry compromise, or compromised transitive dependency could introduce arbitrary executable behavior.The package name is consistent with the Skill's declared Morpho functionality, and there is no evidence in the audited files that the current package is malicious. The vulnerability is the unsafe dependency resolution and execution model rather than confirmed malicious package content.
Attack Path
- An attacker compromises the package publication process, a package maintainer account, the npm distribution channel, or a transitive dependency.
- The attacker publishes a malicious version that remains compatible with the unversioned package reference.
- A user asks the agent to perform a Morpho query, transaction preparation, or simulation.
- Following
SKILL.md, the agent invokesnpx @morpho-org/cliwithout an exact version. npxresolves the attacker-controlled release and downloads it if it is not already available locally.- Package installation or runtime code executes with the permissions of the account running the agent.
- The malicious code can access data and resources available to that process, potentially befor ...[truncated 1042 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an exact version that has been independently reviewed:
bash npx --yes @morpho-org/cli@<reviewed-exact-version> <command> [options] - Do not use version ranges or tags such as
latest, because they preserve the ability for executable behavior to change without review. - Install the dependency through a committed package manifest and lockfile, and use a reproducible installation method such as
npm ci. - Verify npm package provenance, signatures where available, and registry integrity metadata before approving upgrades.
- Review the package and its transitive dependency changes before updating the pinned version.
- Prefer vendoring or shipping auditable implementation code where operationally feasible.
- Execute the CLI in a sandbox with minimal filesystem access, restricted environment variables, no private-key access, and tightly controlled network permissions.
- Independently validate transaction destination addresses, chain IDs, calldata intent, approval spenders and amounts, simulation results, and warnings before presenting unsigned transactions to the user.
- Pin the CLI to an exact version that has been independently reviewed:
