T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Execution of an Unpinned Third-Party npm Package Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14–18
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: Mediumbash ## Installation xapi is available via npx (no install needed): ```bash npx xapi-to <command>text ### Technical Analysis The skill directs the agent to execute `xapi-to` through `npx` without specifying an exact package version or verifying an integrity digest. When the package is not already available locally, `npx` may retrieve it from the configured npm registry and immediately execute its code. Because package resolution is mutable, the code executed during a future skill invocation may differ from the code that existed when this skill was reviewed. Compromise of the package, its maintainer account, the package publication process, or the configured registry could therefore turn an otherwise legitimate command into arbitrary local code execution. The same unpinned invocation pattern is repeated throughout `SKILL.md`. ### Attack Path 1. An attacker compromises the `xapi-to` npm package, a publisher account, the package delivery process, or a registry trusted by the environment. 2. The attacker publishes or serves a malicious version under the package name resolved by `npx xapi-to`. 3. An agent follows the skill instructions and runs one of the documented `npx xapi-to` commands. 4. `npx` downloads and executes the attacker-controlled package without an exact version or integrity check. 5. The malicious package executes with the permissions of the agent process and accesses resources available to that account. ### Impact Assessment Successful exploitation permits arbitrary code execution with the privileges of the user running the agent. The accessible scope may include project files, process environment variables, the xapi API key, `~/.xapi/config.json`, OAuth-related state, and any other files or credentials readable by that user. The pa ...[truncated 281 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an exact, reviewed version, for example:
bash npx --yes xapi-to@X.Y.Z <command> - Record and verify the package integrity digest through a lockfile or an equivalent trusted verification mechanism.
- Document the expected npm registry, official package publisher, and package provenance.
- Disable lifecycle scripts during installation where compatible with the package and deployment model.
- Prefer installing a reviewed version in a controlled build step rather than downloading executable code during each skill invocation.
- Run the CLI under least privilege, with access limited to only the required files, credentials, and network destinations.
- Replace every unpinned
npx xapi-toexample in the skill with the same pinned and verified invocation.
- Pin the CLI to an exact, reviewed version, for example:
