T08 · Insecure Dependencies
- Location
SKILL.md:52- Finding
Unpinned npm Package Retrieval and Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 52–56
Vulnerability Type:T08: Insecure Dependencies
Risk Level: Mediummarkdown If you see "Access token EXPIRED", run: ```bash cd ~/Clawdis && npx clawdbot configureThen select "Anthropic OAuth (Claude Pro/Max)" to re-authenticate.
text ### Technical Analysis The recommended command executes `npx clawdbot configure` without specifying a reviewed package version or integrity digest. If `clawdbot` is not already available locally, `npx` may download the package selected by npm registry resolution and execute its CLI code with the invoking user's permissions. Because package resolution is unpinned, the code executed by this instruction can change after the Skill has been audited. A compromised package release, registry account, registry configuration, or dependency in the resolved package could therefore introduce attacker-controlled code. The project contains no lockfile, package manifest, integrity metadata, or implementation that constrains this resolution. ### Attack Path 1. An attacker compromises the npm package, a transitive dependency, its publishing account, or a registry used by the victim. 2. The attacker publishes a malicious version that is selected by unpinned npm resolution. 3. A user encounters the documented OAuth-expiration condition and follows the instruction in `SKILL.md`. 4. The user runs `npx clawdbot configure`. 5. If a verified local package is unavailable, `npx` retrieves the attacker-controlled package version and executes its CLI or applicable lifecycle code. 6. The malicious code operates with the permissions of the user who invoked the command. ### Impact Assessment Successful exploitation could permit arbitrary code execution under the invoking user's account. Within that user's privileges, malicious package code could read or modify accessible files, alter the Clawdbot installation or configurat ...[truncated 413 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
clawdbotto an explicitly reviewed version rather than relying on the registry's current resolution. - Define dependencies in a controlled project manifest and commit the corresponding lockfile.
- Enforce package integrity verification through lockfile integrity hashes and a trusted npm registry.
- Prefer invoking an already installed and verified local binary, such as through an npm script, instead of allowing
npxto download code on demand. - If
npxremains necessary, use an exact package version, disable interactive package installation where supported, and verify package provenance before execution. - Audit the selected package and its transitive dependencies, including lifecycle scripts, before distributing the instruction.
- Run configuration tooling with the least privileges required and avoid executing it from an elevated shell.
- Pin
