[Security] Critical: WebSocket RBAC bypass allows viewer to execute arbitrary OS commands
Hi @bayendor,
I'm an independent security researcher. I found two privilege escalation vulnerabilities in hermes-control-interface that allow a viewer-role user to perform admin-only actions.
I sent you a DM on X (@bayendor) on 2026-05-25 but haven't received a response, so I'm opening this issue to make sure the report reaches you.
Summary (no full PoC — coordinated disclosure)
| # | Finding | CVSS 3.1 |
|---|---|---|
| 01 | WebSocket Terminal RBAC Bypass | 9.9 Critical |
| 02 | File Write Missing Permission Check | 7.5 High |
FINDING-01 — WebSocket RBAC Bypass (CVSS 9.9)
src/server.js line ~5083 processes terminal-input messages from any authenticated user without checking the terminal permission. The REST equivalent (POST /api/terminal/exec) correctly enforces
requirePerm('terminal.exec'), but the WebSocket path was missed.
Impact: a viewer account gets a full OS shell. The terminal session is also a shared singleton — a viewer can inject commands into an active admin session.
FINDING-02 — File Write Missing Permission Check (CVSS 7.5)
POST /api/file at line ~2792 applies requireCsrf but is missing requirePerm('files.write'). A viewer (who has files.read) can overwrite files within the explorer root using a valid CSRF token (always available via GET /api/auth/me).
What I'm asking
Please enable GitHub Security Advisories (Settings → Security → Advisories) so I can send the full report with PoCs privately, or reply with a contact email.
I'm following a 90-day coordinated disclosure window from 2026-05-25.
Reporter: Mateus Gama — [email protected]
Fixed in 1419564 and deployed to production.
FIX #66 — Security RBAC Bypass:
-
WebSocket terminal-input (CVSS 9.9): Added permission gate — checks admin role or terminal permission before processing via WS.
-
POST /api/file (CVSS 7.5): Added requireAuth + requirePerm('files.write'). 401 for no-auth, 403 for viewer.
Tests: 12/13 pass. Thanks @BlessedOn3 for the responsible disclosure.
Hi @xaspx,
Thanks again for the quick fix and for the credit — really appreciated.
Now that both vulnerabilities are patched and deployed, I'd like to request that you create two GitHub Security Advisories (GHSAs) for them — one per finding. Since GitHub is a CNA, this is the fastest path to get official CVE IDs assigned automatically.
You can create them here:
Settings → Security → Security advisories → New draft security advisory
Here's a summary for each:
Advisory 1 — WebSocket Terminal RBAC Bypass
- Severity: Critical — 9.9 (
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) - CWE: CWE-862 (Missing Authorization)
- Affected:
<= 3.5.1| Fixed: commit1419564 - Description: The WebSocket
terminal-inputhandler checks onlysocket.authedwithout enforcing theterminalpermission, allowing a viewer-role user to execute arbitrary OS commands via the shared PTY.
Advisory 2 — File Write Missing Permission Check
- Severity: High — 7.5 (
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L) - CWE: CWE-862 (Missing Authorization)
- Affected:
<= 3.5.1| Fixed: commit1419564 - Description:
POST /api/fileapplies CSRF validation but omitsrequirePerm('files.write'), allowing a viewer to overwrite files within the configured explorer roots.
I have the full advisory content ready (descriptions, PoC, references) — happy to share as a collaborator on the drafts if that helps.
Thanks,
Mateus Gama
Hi @BlessedOn3 — thanks for the detailed advisory summaries!
I've created both GHSAs as drafts:
-
WebSocket Terminal RBAC Bypass: https://github.com/xaspx/hermes-control-interface/security/advisories/GHSA-p2vm-qhqj-5r4h (Critical 9.9, CWE-862)
-
File Write Missing Permission Check: https://github.com/xaspx/hermes-control-interface/security/advisories/GHSA-c99h-vx9f-5h2x (High 7.5, CWE-862)
Happy to add you as a collaborator on both drafts if you'd like to contribute the full PoC and descriptions. Let me know your preferred GitHub handle or email for the invitation.
Also — would you like to be credited in the advisories under your real name (Mateus Gama) or your GitHub handle (BlessedOn3)?
Hi @bayendor — glad the summaries were useful! Please credit me as @BlessedOn3 on GitHub. Happy to contribute the full PoC and descriptions for both advisories.
Thanks for creating the GHSAs so quickly.
Thanks @BlessedOn3 — really appreciate the coordinated disclosure.
✅ Credited as @BlessedOn3 on both GHSAs — adding you as a collaborator now so you can contribute the full PoCs and descriptions directly.
Both advisories are drafted:
- GHSA-p2vm-qhqj-5r4h — WebSocket Terminal RBAC Bypass (Critical 9.9)
- GHSA-c99h-vx9f-5h2x — File Write Missing Permission Check (High 7.5)
Once the PoCs and descriptions are in, we'll publish them and request CVEs.
Hi @baprender! Here's my PoC repository with full exploitation scripts for both findings:
🔗 https://github.com/BlessedOn3/poc-hermes-ws-rbac-bypass
It includes:
poc/ws_rbac_bypass.py— FINDING-01 (WebSocket Terminal RBAC Bypass)poc/file_write_bypass.sh— FINDING-02 (File Write Missing Permission)payloads/— malicious profile + reverse shell payload
Could you send the collaborator invite to BlessedOn3 on GitHub so I can contribute the PoC descriptions directly
to both advisories (GHSA-phjm-gxwg-9v4k and GHSA-x48c-p8bv-8h5t)?
Thanks!