T08 · Insecure Dependencies
- Location
SKILL.md:43- Finding
Unpinned npm Package Is Downloaded and Executed Automatically
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 43
Vulnerability Type: Supply-chain exposure through an unpinned runtime dependency
Risk Level: MediumVulnerable Code
text - **If not installed**, prompt: use npx -y @alipay/agent-payment@latest install to install and activate the Alipay AI wallet capability, then enable the Alipay payment functionThe original instruction invokes:
bash npx -y @alipay/agent-payment@latest installTechnical Analysis
The Skill directs the user or Agent to download and execute the
latestrelease of an npm package. Thenpx -yflags allow execution without an interactive package-installation review, while the@latesttag is mutable and can resolve to code different from the version assessed during this audit.The instruction provides no immutable version, package integrity hash, lockfile, signature verification, or trusted-artifact validation procedure. Consequently, the effective code executed by this command is controlled by the package version available from the registry at invocation time.
This is an insecure dependency practice rather than evidence that the currently named package is malicious. The risk becomes exploitable if the package publisher account, npm registry delivery path, package maintenance process, or a future release is compromised.
Attack Path
- An attacker compromises the package publisher account or another part of the package publication pipeline.
- The attacker publishes a malicious release and assigns it to the mutable
latestdistribution tag. - The payment dependency is absent in a target environment.
- The Skill presents or causes the user to follow the documented installation instruction.
npx -ydownloads the attacker-controlled release and executes its package lifecycle or command code without an interactive installation review.- The malicious package runs with the permissions of the user or Agent process and may access resources ...[truncated 797 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace
@latestwith an exact, reviewed package version, for example:bash npx -y @alipay/agent-payment@X.Y.Z install -
Verify the package artifact against a documented integrity hash or trusted signature before execution.
-
Use a lockfile and a trusted, explicitly configured npm registry where the deployment model permits it.
-
Prefer installation during a controlled build or provisioning stage instead of downloading executable dependencies at runtime.
-
Require explicit user approval that identifies the exact package, version, source registry, requested action, and security implications before installation.
-
Disable or review dependency lifecycle scripts where feasible.
-
Periodically audit the pinned version and update it only through a reviewed change-control process.
-
Run the installation with least privilege in a sandboxed environment that cannot access unrelated credentials, sensitive files, or wallet state.
-
