hermes-control-interface icon indicating copy to clipboard operation
hermes-control-interface copied to clipboard

[BUG] Session Rename Command Injection

Open stamandster opened this issue 7 months ago • 1 comments

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);

stamandster avatar Apr 23 '26 14:04 stamandster

✅ 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

xaspx avatar Apr 27 '26 11:04 xaspx