T08 · Insecure Dependencies
- Location
SKILL.md:19- Finding
Unpinned Third-Party npm Package Is Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 19–25
Vulnerability Type: Unpinned and mutable third-party dependency execution
Risk Level: HighVulnerable Code
bash npx videosays whoamiIf authentication is missing, run:
bash npx videosays loginAsk the user to open the printed authorization URL, sign in, and approve the CLI. If the user explicitly provides an API key, run
npx videosays login --api-key "$VIDEOSAYS_API_KEY". Never print or reveal the API key.Technical Analysis
The Skill instructs the Agent to invoke
npx videosayswithout specifying an exact package version, lockfile, package integrity hash, or trusted installation source. Depending on the local npm configuration and cache state,npxcan retrieve the package from the configured npm registry and immediately execute its entry point.Consequently, the code executed by the Agent is mutable after this Skill has been audited. Compromise of the package, its publisher account, one of its transitive dependencies, or the configured package registry could cause future invocations to execute malicious code. This is especially sensitive during the login command because the process may receive
VIDEOSAYS_API_KEYand other environment variables.Attack Path
- An attacker compromises the
videosayspackage publisher, a transitive dependency, or the npm registry resolution path. - The attacker publishes or serves a malicious package version.
- An Agent follows the Skill and runs an unversioned
npx videosayscommand. npxdownloads and executes the attacker-controlled package with the Agent process's operating-system privileges.- The malicious package reads accessible environment variables, including a supplied API key, and may access or alter files and make network requests within the Agent's permission boundary.
Impact Assessment
Successful exploitation permits arbitrary code executio ...[truncated 414 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an explicitly reviewed version, such as
npx --yes videosays@<exact-version>, rather than resolving the latest available release. - Prefer a project-local installation governed by a committed lockfile and npm integrity metadata.
- Verify package provenance, signatures, publisher identity, and integrity before installation.
- Use a trusted registry and disable unexpected registry overrides or dependency sources.
- Run the CLI in a sandbox with minimal filesystem, environment-variable, and network access.
- Expose only the credential required for the specific invocation instead of inheriting the Agent's complete environment.
- Establish a controlled update and re-audit process before changing the pinned version.
- Pin the CLI to an explicitly reviewed version, such as
