T08 · Insecure Dependencies
- Location
SKILL.md:38- Finding
Automatic Execution of an Unpinned Remote npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 38
Vulnerability Type: Supply-chain risk through automatic runtime package installation
Risk Level: HighVulnerable Code Snippet:
bash npx -y @midscene/computer@1 connectThe same
npx -y @midscene/computer@1execution pattern is repeated throughout the documented commands.Technical Analysis
The skill instructs the agent to use
npx -yto retrieve and immediately execute@midscene/computer. The-yoption suppresses the installation confirmation, while@1constrains only the major version rather than selecting an exact, previously reviewed release. No lockfile or package-integrity hash is present in the audited project.Consequently, the code executed by a future skill invocation may differ from the code available when the skill was reviewed. A compromised package publisher, npm account, package release, or transitive dependency could introduce arbitrary code into the runtime installation.
This risk is particularly significant because the dependency is intended to receive desktop-control permissions, capture screenshots, and control the real mouse and keyboard.
Attack Path
- An attacker compromises the npm publisher account, the package, or one of its transitive dependencies.
- The attacker publishes a malicious release compatible with the
@1version range. - A user or agent follows the skill instructions and runs an
npx -y @midscene/computer@1command. npxautomatically downloads the currently resolved package without interactive approval.- The downloaded package executes in the invoking user's environment.
- Malicious package code abuses the process's filesystem, network, credential, or desktop-automation access.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the user running the skill. Depending on the host configuration, the malicious package coul ...[truncated 481 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version instead of the floating major-version range.
- Declare the dependency in a package manifest and commit a lockfile containing resolved versions and integrity hashes.
- Install dependencies as a separate, explicit setup operation rather than downloading and executing them during every invocation.
- Verify package provenance, registry origin, publisher identity, signatures, and integrity before installation.
- Use the official npm registry explicitly and enforce an approved dependency allowlist.
- Disable package lifecycle scripts where compatible with the dependency.
- Run desktop automation in an isolated VM or restricted operating-system account with limited filesystem and credential access.
- Regularly scan the pinned package and all transitive dependencies for known vulnerabilities and unexpected ownership changes.
