T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:29- Finding
Execution of Unpinned Remote npm Packages
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 29 and 62
Vulnerability Type:T03: Remote Payload Retrieval and Execution, T08: Insecure Dependencies
Risk Level: HighComplete Code Snippet:
text npx -y @peakinc/init@latest --yes --json --no-browsertext npx -y @peakinc/wizard@latest --yes --json --no-browserTechnical Analysis
The Skill instructs the agent to use
npxto download and execute two npm packages selected through the mutablelatesttag. The-yoption suppresses the normal installation confirmation. Consequently, the code executed during a future Skill invocation may differ from the code available when the Skill was audited.This creates both a remote payload execution risk and an insecure software supply-chain dependency. Compromise of the npm publisher account, package registry, package maintainers, or a future release could cause arbitrary attacker-controlled JavaScript to execute locally. No exact package version, package integrity hash, signature verification, or source review requirement is provided.
Attack Path
- An attacker compromises the publisher account, release pipeline, or another component used to publish
@peakinc/initor@peakinc/wizard. - The attacker publishes a malicious package version and assigns it to the
latestdistribution tag. - A user asks the agent to configure Peak for a repository.
- Following
SKILL.md, the agent executes the correspondingnpx -y ...@latestcommand without an installation prompt. - npm retrieves and executes the attacker-controlled package under the agent process's current operating-system account.
- The malicious package can access resources available to that account, including repository files, process environment variables, local Git configuration, and credentials exposed to the process.
Impact Assessment
Successful exploitation permits arbitrary code execution with the privil ...[truncated 590 chars]
- An attacker compromises the publisher account, release pipeline, or another component used to publish
- Remediation
View remediation
Remediation Suggestions
- Replace each
@latestreference with a reviewed, exact package version, such as@peakinc/init@X.Y.Zand@peakinc/wizard@X.Y.Z. - Establish a controlled update process in which new versions are reviewed and tested before the pinned version is changed.
- Verify downloaded package integrity using a trusted lockfile, registry integrity metadata, signatures, or independently maintained checksums.
- Avoid suppressing installation confirmation with
-yunless execution occurs in a controlled environment and the package version has already been approved. - Require explicit user approval before downloading and executing a package for the first time.
- Run the CLI with least privilege in an isolated environment that exposes only the target repository and the minimum required credentials.
- Remove unrelated secrets from the child process environment and ensure sensitive credentials are narrowly scoped and short-lived.
- Replace each
