T08 · Insecure Dependencies
- Location
SKILL.md:19- Finding
Unpinned npm Package Retrieval and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:19, 33-39, 503, 585
Vulnerability Type: Unpinned third-party executable dependency
Risk Level: HighVulnerable Code
markdown 2. If it is not installed, use `npx moltsheet@latest ...` or install it globallybash npm install -g moltsheetbash npx moltsheet@latest auth statusbash npx moltsheet@latest sheet list --jsonmarkdown - Use `npx moltsheet@latest` when the binary is not installedTechnical Analysis
The Skill directs the agent to retrieve and execute the mutable
latestrelease of an npm package. No exact package version, lockfile, package integrity value, or other mechanism binds execution to an audited artifact.Because the npm registry determines which package version the
latesttag resolves to at execution time, the effective executable payload can change after this Skill has been reviewed. A compromised maintainer account, malicious package release, registry compromise, or upstream dependency compromise could consequently introduce arbitrary code into the agent environment.The globally installed alternative also expands the potential scope of a compromised package. It can place executable files into global npm paths and may run package lifecycle scripts. The precise privileges available depend on the account under which npm is invoked.
Attack Path
- An attacker compromises the
moltsheetnpm package, one of its dependencies, or an authorized publisher account. - The attacker publishes a malicious release and assigns it the
latestdistribution tag. - An agent follows the Skill and invokes
npx moltsheet@latest ...or globally installs the package. - npm downloads the unaudited release and may execute package lifecycle scripts or the malicious CLI.
- The payload executes with the privileges of the agent process and can access resources available to that account, po ...[truncated 746 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Replace every
moltsheet@latestreference with an exact, reviewed version, such asmoltsheet@1.0.8. - Pin transitive dependencies with a lockfile and verify package integrity hashes where the execution environment supports them.
- Prefer a project-local installation over a global installation so that the dependency is isolated and reproducible.
- Use
npm ciwith a reviewed lockfile rather than resolving dependencies dynamically. - Disable npm lifecycle scripts where they are unnecessary, for example with
--ignore-scripts, after verifying that the package functions correctly without them. - Require review and testing before updating the pinned CLI version.
- Where possible, distribute a verified binary or package artifact from a controlled source and validate its cryptographic checksum before execution.
- Replace every
