T08 · Insecure Dependencies
- Location
SKILL.md:10- Finding
Execution of an Unpinned Third-Party CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10–13
Vulnerability Type: Supply-chain exposure through a mutable npm package tag
Risk Level: HighVulnerable Code:
yaml allowed-tools: - "Bash(npx agnic@latest status*)" - "Bash(npx agnic@latest address*)" - "Bash(npx agnic@latest balance*)"Technical Analysis
The skill authorizes execution of
npx agnic@latest. The npmlatesttag is mutable, so the code executed during a future invocation may differ from the code available when the skill was audited. When the package is not already installed,npxcan retrieve and execute it at runtime.No reviewed version, lockfile integrity value, or other immutable package identifier is specified. A compromised package release, npm publisher account, or mutable distribution tag could therefore introduce arbitrary code without requiring changes to this repository. The risk is amplified because the CLI supplies the cryptocurrency address to which users are instructed to transfer USDC.
Attack Path
- An attacker compromises the
agnicnpm package, its publisher account, or a release referenced by thelatesttag. - The attacker publishes a malicious version and assigns it to
latest. - The agent invokes an allowed command such as
npx agnic@latest address. npxdownloads and executes the malicious package in the agent's environment.- The package executes arbitrary code with the privileges of the agent process, accesses data available to that process, or returns an attacker-controlled wallet address.
- If the displayed address is trusted, the user may irreversibly transfer USDC to the attacker.
Impact Assessment
Successful exploitation could provide code execution with the privileges of the user or service running the agent. Data accessible to that process—including environment variables and potentially
AGNIC_TOKEN—could be read or modified. A substituted walle ...[truncated 359 chars]- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Replace
agnic@latestwith an explicitly pinned and reviewed version. - Use a lockfile and verify package integrity through trusted registry metadata or an independently validated checksum.
- Prefer a preinstalled, reviewed executable rather than downloading executable code when the skill runs.
- Verify the package publisher, provenance, signatures, and release process before deployment.
- Run the CLI in a restricted environment with minimal filesystem, environment-variable, and network access.
- Require users to verify the destination address through a separate trusted channel, such as the authenticated dashboard, before transferring funds.
- Establish an update process in which new CLI versions are reviewed and tested before changing the pinned version.
- Replace
