T08 · Insecure Dependencies
- Location
scripts/claim.mjs:18- Finding
Unpinned dependency loaded from outside the audited skill directory
- Content
View full analysis
import('ws')); ``` ### Technical Analysis The script dynamically imports the `ws` module from a workspace-level `node_modules` directory outside the audited skill package. If that import fails, it falls back to normal Node.js package resolution: ```js await import(wsPath).catch(() => import('ws')); ``` The project contains no package manifest or lockfile that specifies an audited `ws` version and package integrity. Consequently, the effective executable dependency depends on the surrounding workspace, global package-resolution configuration, or package version installed by the operator. Because an imported Node.js module executes with the privileges of the skill process, replacing or poisoning the resolved module creates a code-execution path. This finding does not establish that the currently installed `ws` package is malicious; it identifies an unsafe and unauditable dependency boundary. ### Attack Path 1. An attacker gains the ability to modify the workspace-level `node_modules/ws` package, influence Node.js package resolution, or supply a compromised package during dependency installation. 2. The user invokes the coupon-claiming skill. 3. The script resolves `../../../node_modules/ws/wrapper.mjs`, or falls back to an uncontrolled `ws` package. 4. Node.js loads and executes the dependency before the skill connects to the browser. 5. Malicious module initialization code executes with the same filesystem, network, environment, and process privileges as the skill. ### Impact Assessment Successful exploitation permits arbitrary JavaScript execution under the account running OpenClaw. Dep ...[truncated 379 chars]- Remediation
View remediation
