T08 · Insecure Dependencies
- Location
references/troubleshooting.md:8- Finding
Unpinned Global Package Installation Creates Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
references/troubleshooting.md, lines 8-12
Vulnerability Type: Unpinned third-party package installation
Risk Level: MediumVulnerable Code
bash ### Gateway crashes repeatedly - Check logs: `openclaw gateway logs` - Verify Node.js version: `node --version` (need v20+) - Check LaunchAgent: `launchctl list | grep openclaw` - Reinstall: `npm install -g openclaw`Technical Analysis
The troubleshooting instructions recommend installing
openclawglobally from the configured npm registry without specifying a reviewed version or verifying package integrity. The effective code installed by this command can therefore change after the Skill has been audited.npm packages may contain lifecycle scripts that execute during installation. If the registry package, maintainer account, dependency tree, or local npm registry configuration is compromised, following this instruction could execute attacker-controlled code. The risk is increased by global installation because the package exposes commands across the user's environment and modifies a shared package location.
The command does not explicitly use
sudo, so execution is ordinarily limited to the privileges of the user running npm. If a user independently prefixes it withsudoor uses a privileged npm environment, package lifecycle code could run with elevated privileges.Attack Path
- An attacker compromises the published
openclawpackage, one of its dependencies, a maintainer account, or a registry endpoint used by the victim. - A malicious package version or dependency is published under the expected package name.
- The victim experiences repeated gateway crashes and follows the documented reinstall instruction.
npm install -g openclawresolves the current package version rather than a specifically reviewed release.- npm downloads the compromised content and may execute its lifecycle sc ...[truncated 777 chars]
- An attacker compromises the published
- Remediation
View remediation
Remediation Suggestions
-
Pin installation instructions to a specifically reviewed release, for example:
bash npm install -g openclaw@REVIEWED_VERSION -
Document the expected official npm package name, publisher, and registry URL.
-
Verify the package version and integrity before installation. Where practical, distribute and validate signed release artifacts or documented checksums.
-
Review the package's lifecycle scripts and dependency tree before recommending a release.
-
Avoid running global package installations through
sudo; install with the minimum privileges required. -
Prefer a reproducible installation mechanism using a lockfile or an equivalent integrity-controlled dependency manifest.
-
Consider first offering a repair or rollback procedure that does not automatically resolve mutable package content.
-
