T08 · Insecure Dependencies
- Location
SKILL.md:48- Finding
Unpinned Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 48
Vulnerability Type: Untrusted third-party package resolution and execution
Risk Level: HighVulnerable Code
bash npx skills search "<主题>" # 如果有相关 skillTechnical Analysis
The workflow directs the agent to execute the unversioned
skillspackage throughnpx. If the package is not already installed locally,npxcan resolve it from the configured package registry, download it, and execute its CLI or package lifecycle code.The skill does not specify an exact version, lockfile, integrity hash, trusted publisher, approved registry, or local-only execution requirement. The generic package name also increases exposure to package replacement, dependency confusion, typosquatting, and registry compromise.
Attack Path
- A user invokes the skill with a news topic.
- The agent follows the research workflow and executes
npx skills search. npxfinds no trusted local installation and resolves the package from the configured registry.- A malicious, compromised, or unexpectedly resolved package is downloaded.
- Package lifecycle code or the package CLI executes with the permissions of the agent process.
- The package can access files, environment variables, network resources, and other assets available to that process.
Impact Assessment
Successful exploitation can result in arbitrary code execution under the operating-system account running the agent. The accessible scope may include project files, writable user files, process environment variables, configured credentials, and network resources available to the agent.
The instruction does not itself establish elevated privileges or persistence. Impact is bounded by the permissions and isolation controls applied to the agent process.
- Remediation
View remediation
Remediation Suggestions
- Remove runtime installation and execution of unspecified packages.
- Add the dependency to a reviewed project manifest and pin an exact version.
- Commit and enforce a lockfile with verified integrity metadata.
- Obtain packages only from an approved registry and verify the publisher and package provenance.
- Review the package and its transitive dependencies before approval.
- Disable package lifecycle scripts where operationally practical.
- Invoke only a preinstalled local binary, such as with
npx --no-install. - Run the tool in a restricted environment with minimal filesystem, environment-variable, and network access.
