T09 · Insecure Skill Coding Practices
- Location
assets/openclaw-menubar/renderer.js:448- Finding
DOM XSS in a Node-enabled Electron renderer can lead to local code execution
- Content
View full analysis
📎 ${file.name} ${formatFileSize(file.size)} `; contentDiv.appendChild(fileDiv); ``` The same unsafe filename rendering pattern is also used when restoring history at `assets/openclaw-menubar/renderer.js:611-617`. ### Technical Analysis The name of a user-selected or drag-and-dropped file is interpolated directly into an HTML string and assigned to `innerHTML`. File names are attacker-influenced and can contain HTML metacharacters. A malicious filename can therefore terminate the intended element and introduce an element with an event handler, resulting in JavaScript execution. The affected alternate interface is `assets/openclaw-menubar/index.html`, which loads `renderer.js`. If this interface is loaded in the configured Electron window, injected JavaScript runs with: - `nodeIntegration: true` - `contextIsolation: false` - `enableRemoteModule: true` Consequently, renderer-level script execution can access Node.js APIs, read or modify files available to the user, and potentially invoke local programs. This converts a DOM injection issue into a local code-execution boundary failure. The standard launch path currently points to `index-webchat.html`, which does not load `renderer.js`. Therefore, this vulnerability is dormant in the default flow, but the vulnerable alternate interface remains package ...[truncated 1448 chars]- Remediation
View remediation
