T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:29- Finding
Unapproved Remote Package Retrieval and Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 29-35
Vulnerability Type: Remote retrieval and execution of an unpinned npm package
Risk Level: Mediumbash Prefer the local CLI. Check availability in this order: ```bash ptide --version puzzletide --version npx puzzletide --versiontext ### Technical Analysis The skill instructs the agent to execute `npx puzzletide --version` as an availability check. When the package is not already available locally, `npx` may contact the configured npm registry, retrieve the `puzzletide` package, and execute its CLI entry point. Because no exact package version or integrity value is specified, the code executed can change after the skill has been reviewed. This behavior conflicts with the later instruction to obtain user approval before installing the package and with the claim that the skill requires no network access. Checking a package through `npx` is not equivalent to checking for an existing local executable because it can cross the network boundary and introduce executable third-party code. The primary classification is remote payload retrieval and execution because the effective code is obtained from an external package registry at runtime. It also presents a supply-chain risk due to the unpinned dependency. ### Attack Path 1. Neither `ptide` nor `puzzletide` is installed locally. 2. The agent follows the documented availability-check sequence. 3. The agent invokes `npx puzzletide --version`. 4. `npx` resolves the unpinned package through the configured npm registry and may prompt for or perform temporary package installation. 5. A compromised package release, dependency, registry, or registry configuration supplies attacker-controlled code. 6. The downloaded package or its dependency code executes with the operating-system privileges of the user running the agent. ### Impact Assessment Successful exploitation could execute arbitrary c ...[truncated 562 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
npx puzzletide --versionfrom the pre-consent availability checks. - Check only for existing local executables, for example with
command -v ptideandcommand -v puzzletide. - Ask for explicit user approval before any command that can contact a package registry, download a package, or execute newly retrieved code.
- If the user approves installation or temporary execution, pin an audited exact package version rather than resolving the latest release.
- Use a trusted, explicitly configured npm registry and verify package integrity or provenance where supported.
- Disable dependency lifecycle scripts where feasible and confirm that the required CLI remains functional under that restriction.
- Update the safety documentation to disclose any required network access and distinguish local executable discovery from remote package retrieval.
- Remove
