T08 · Insecure Dependencies
- Location
SKILL.md:42- Finding
Unpinned Package Retrieval and Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 42
Vulnerability Type: Unpinned third-party package execution
Risk Level: HighVulnerable Code
bash HTML=$(npx marked {todays-brief.md} --breaks)Technical Analysis
The skill requires
npx markedto convert the generated Markdown file into HTML, but it does not specify a package version, local lockfile, integrity hash, or trusted package source. Ifmarkedis unavailable locally,npxmay retrieve a package from the configured registry and execute it immediately.Consequently, the code executed during a skill run can differ from the code that was reviewed. A compromised package release, transitive dependency, registry, or package-resolution configuration could introduce arbitrary executable code. Package installation behavior and lifecycle scripts may execute with the same operating-system privileges as the agent.
Attack Path
- An attacker compromises the selected
markedpackage release, one of its resolved dependencies, or the package registry used bynpx. - The user invokes the news-digest skill.
- The skill executes
npx markedwithout an installed, pinned, and integrity-verified local version. npxresolves and potentially downloads the externally controlled package.- Malicious package or lifecycle code executes under the agent's account.
- The payload can access resources available to that account and may modify files or invoke additional processes.
Impact Assessment
Successful exploitation can provide arbitrary code execution with the privileges of the user or service running the agent. The accessible scope may include project files, the generated news archive, environment variables, locally available credentials, and network resources permitted to the process. The instruction itself does not request privilege escalation, so the maximum direct privilege is limited to the agent process's existing permis ...[truncated 6 chars]
- An attacker compromises the selected
- Remediation
View remediation
Remediation Suggestions
- Add a reviewed version of
markedto the project dependencies and pin its exact version through a lockfile. - Install dependencies during a controlled deployment step rather than dynamically during skill execution.
- Invoke only the verified local executable, with network-based installation disabled, such as
npx --offline --no-install marked. - Enforce lockfile integrity in CI and monitor dependencies for compromised or vulnerable releases.
- Run document conversion in a restricted environment with minimal filesystem, credential, and network access.
- Where practical, use a reviewed in-process Markdown conversion library instead of launching a package through a shell.
- Add a reviewed version of
