T08 · Insecure Dependencies
- Location
SKILL.md:15- Finding
Unpinned npm Package Execution During Global Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 15–17
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
bash npx skills add nexscope-ai/eCommerce-Skills --skill product-differentiation-amazon -gTechnical Analysis
The documented installation command invokes the
skillsnpm package throughnpxwithout specifying an exact version or verifying an integrity hash. If the package is not already available locally,npxmay retrieve its currently resolved version from the configured npm registry and execute its CLI code.Consequently, the code executed during installation is not fully determined by the audited repository. A compromised package release, registry account, dependency, or registry configuration could cause the command to execute code that differs from the version originally reviewed.
The global installation option (
-g) further increases the potential scope by installing remotely sourced content into a persistent, system-wide or user-wide package location.Attack Path
- An attacker compromises the npm package, one of its transitive dependencies, its publisher account, or the package source resolved under the name
skills. - The attacker publishes a malicious version containing harmful CLI or lifecycle behavior.
- A user follows the installation command in
SKILL.md. - Because no exact package version is specified,
npxresolves and downloads the attacker-controlled release. npxexecutes the package with the permissions of the invoking user.- The malicious package may modify local files, access data available to that user, or alter the globally installed Skill content.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user running the installation command. Accessible resources may include the user's files, environment variables, development c ...[truncated 431 chars]
- An attacker compromises the npm package, one of its transitive dependencies, its publisher account, or the package source resolved under the name
- Remediation
View remediation
Remediation Suggestions
- Pin the installer to a specific, reviewed package version, for example:
bash npx --yes skills@<audited-version> add nexscope-ai/eCommerce-Skills --skill product-differentiation-amazon - Verify the selected package version and its dependency tree before publishing the installation instructions.
- Use a lockfile and npm integrity metadata where installation workflow permits.
- Document the expected npm registry and prevent resolution through untrusted registry mirrors.
- Avoid global installation by default. Prefer a project-local or isolated installation with least-privilege permissions.
- Run installation without administrator or root privileges.
- Consider distributing a reviewed local installer or signed release artifact whose integrity can be independently verified.
- Periodically audit the installer package and all transitive dependencies for ownership changes, unexpected lifecycle scripts, and known vulnerabilities.
- Pin the installer to a specific, reviewed package version, for example:
