Context-Inappropriate Capability
Medium
- Confidence
- 88% confidence
- Finding
- The script invokes `execSync('npm root -g')`, which executes a shell command during patching. While intended to discover OpenClaw's install path, this introduces unnecessary command-execution capability into a file-editing utility and inherits the risks of PATH hijacking, unexpected shell behavior, or running attacker-controlled `npm` binaries in compromised environments.
