T08 · Insecure Dependencies
- Location
SKILL.md:39- Finding
Unpinned Runtime Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 39
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code:
shell cd /root/.openclaw/workspace/skills/tesseract-ocr && npm init -y > /dev/null 2>&1 && npm install tesseract.jsTechnical Analysis
The documented setup procedure installs
tesseract.jswithout an exact version constraint, committed lockfile, or explicit integrity verification. The reviewed project contains neither apackage.jsonnor a package lockfile that defines a reproducible, audited dependency graph.As a result,
npm install tesseract.jsresolves whichever package version and transitive dependencies are available from the configured registry at installation time. The effective code installed and subsequently loaded byscripts/ocr.jscan therefore change after the Skill has been reviewed. NPM package installation may also execute dependency lifecycle scripts with the privileges of the user performing the installation.This is a supply-chain weakness rather than evidence that the current
tesseract.jspackage is malicious.Attack Path
- An attacker compromises a future
tesseract.jsrelease, one of its transitive dependencies, or the package-resolution channel. - A user follows the setup command in
SKILL.md. - NPM resolves and downloads the attacker-controlled version because no audited version or lockfile constrains resolution.
- Malicious code may execute during an NPM lifecycle hook or when
scripts/ocr.jsimportstesseract.js. - The payload runs under the account that installed or invoked the Skill and can access resources available to that account.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the installing or invoking user. The potential scope includes reading or modifying files accessible to that account, accessing available environ ...[truncated 360 chars]
- An attacker compromises a future
- Remediation
View remediation
Remediation Suggestions
- Add a maintained
package.jsonandpackage-lock.jsonto the project. - Pin
tesseract.jsto a specific, audited version rather than relying on the latest registry-selected release. - Install reproducibly with
npm ciinstead of generating package metadata and resolving dependencies at runtime. - Use
npm ci --ignore-scriptsif Tesseract.js and its dependency graph function without lifecycle scripts. - Review and update dependencies through a controlled process that includes vulnerability scanning, provenance checks, and lockfile review.
- Verify registry configuration and package integrity, and avoid running installation as root. Use a dedicated, least-privileged account or isolated container.
- Replace the documented command with a reproducible installation procedure, for example:
shell cd /root/.openclaw/workspace/skills/tesseract-ocr npm ci --ignore-scriptsThis command should only be used after committing and reviewing the corresponding manifest and lockfile.
- Add a maintained
