T08 · Insecure Dependencies
- Location
README.md:6- Finding
Unpinned npm Package Execution in Installation Instructions
- Content
View full analysis
Vulnerability Details
File Location:
README.md, lines 6–8
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumComplete Code Snippet:
bash ## Install ```bash npx clawhub install social-video-analyticstext ### Technical Analysis The installation instructions invoke `clawhub` through `npx` without specifying an exact package version or verifying package integrity. If the package is not already available locally, `npx` can retrieve it from the configured npm registry and execute its command-line entry point. Consequently, the code executed during installation is not fixed to the version that was reviewed. A compromised maintainer account, malicious package release, registry compromise, or unexpected future update could cause the command to execute attacker-controlled package lifecycle scripts or command-line code. The reviewed artifact contains no lockfile, checksum, signature-verification procedure, or vendored installer implementation that would constrain the retrieved code. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or the dependency publication process. 2. The attacker publishes a malicious version that can be selected by the unversioned `npx clawhub` invocation. 3. A user follows the documented installation command. 4. `npx` resolves and downloads the attacker-controlled release from the configured registry. 5. Package lifecycle logic or the `clawhub` executable runs with the privileges of the user executing the command. 6. The malicious code can access resources available to that user and may alter files, steal credentials, or install additional payloads. ### Impact Assessment Successful exploitation permits arbitrary code execution with the privileges of the user running the installation command. The potential scope includes the user's files, environment variables, developer credentials, accessible repositories, ne ...[truncated 285 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
clawhubto a reviewed exact version, for examplenpx clawhub@X.Y.Z install social-video-analytics, rather than allowing automatic selection of the latest release. - Document the expected npm registry and verified publisher identity.
- Provide an integrity hash or cryptographic signature and require verification before execution.
- Prefer a lockfile-backed, reproducible installation workflow where practical.
- Review the pinned package, its lifecycle scripts, and its complete dependency tree before recommending execution.
- Use a least-privileged account or isolated environment for installation, and avoid running the command as root or with unnecessary secrets present.
- Establish a controlled update process in which new package versions are audited before the documented version is changed.
- Pin
