hermes-control-interface
hermes-control-interface copied to clipboard
[BUG] Session Rename Command Injection
Vulnerability Description The session rename endpoint used the shell() function (which passes commands through bash) instead of the safer execHermes() function, allowing command injection via session IDs or titles.
Affected Code Location
/api/sessions/:id/rename endpoint
Risk Assessment
- Severity: Critical
- Impact: Arbitrary command execution on the server
Original Vulnerable Code
javascript
const cmd = hermes sessions rename ${sessionId} "${title}";
const output = await shell(cmd);
Fix Applied (v3.3.0)
Switched to execHermes() with proper argument array:
javascript
const args = [...profArg, 'sessions', 'rename', sessionId, title];
const output = await execHermes(args);
✅ Already fixed in v3.4.0
This issue was resolved in v3.4.0 but the issue was never closed. Confirming closure in v3.4.0 with the v3.5.0 release.
Release: https://github.com/xaspx/hermes-control-interface/releases/tag/v3.5.0