T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:13
- Finding
- Unpinned Third-Party Package Is Downloaded and Executed Automatically<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:13-15` **Additional Locations**: `README.md:52`; `references/commands.md:6-8,20-23`; `SKILL.md:112-133` **Vulnerability Type**: Remote payload retrieval and execution through an unpinned npm dependency **Risk Level**: High ```bash DISK_360_CLI='npx -y -p @aicloud360/360-ai-cloud-disk-cli@latest 360disk' ``` The same execution pattern is also presented directly: ```bash npx -y -p @aicloud360/360-ai-cloud-disk-cli@latest 360disk <command> ``` ### Technical Analysis The Skill instructs the Agent to use `npx -y` with the mutable `@latest` package tag as its default execution mode. Each invocation may retrieve and execute a package version that did not exist when the Skill was reviewed. The `-y` option suppresses the normal installation confirmation, while `@latest` prevents the executing package from being tied to a reviewed version. The actual CLI implementation is not included in this project, so its code execution, network destinations, credential processing, and local file access cannot be verified through this audit. This creates a remote payload execution channel: control of the npm package, its publisher account, or the applicable registry response is sufficient to change the code executed by the Agent without changing the audited Skill files. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or another relevant supply-chain component. 2. The attacker publishes a malicious release under the `latest` tag. 3. A user asks the Agent to perform a documented cloud-disk operation. 4. The Agent invokes the configured `npx -y -p ...@latest` command. 5. `npx` downloads and executes the malicious package without interactive approval. 6. The package runs with the privileges and environment of the Agent process. 7. It can attempt to read accessible local files, environment variables, stored cloud credentials, and command input, or alter local and remote ...[truncated 737 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed package version: ```bash npx -p @aicloud360/360-ai-cloud-disk-cli@1.2.3 360disk ``` 2. Do not use `-y` for first-time installation or upgrades; require explicit user approval. 3. Pin and verify the package integrity hash through a lockfile or another authenticated integrity mechanism. 4. Document the expected npm registry and prevent untrusted registry overrides. 5. Separate package installation from command execution so that installation can be reviewed and approved once. 6. Perform upgrades through an explicit process that reviews release provenance and package contents before changing the pinned version. 7. Run the CLI in a least-privilege sandbox with access only to the local files required for the requested operation. ]]>
