Hermes WebUI < 0.51.443 - Cross-Profile Session Data Exfiltration via Session Export Endpoint
Description
Hermes WebUI before 0.51.443 contains an authorization bypass vulnerability in the session export endpoint that allows authenticated users to access sessions from other profiles. The _handle_session_export handler in api/routes.py fails to verify active-profile ownership before serializing session data, enabling attackers to exfiltrate foreign session transcripts by guessing or knowing session identifiers.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1- Range: <0.51.443
Patches
Vulnerability mechanics
Root cause
"The `_handle_session_export` and `handle_get` handlers in `api/routes.py` load a session by identifier without verifying that the session's profile matches the requesting user's active profile."
Attack vector
An authenticated attacker who knows or guesses a session identifier belonging to another Hermes profile can call `GET /api/session/export?session_id=<id>` or `GET /api/session?session_id=<id>` to retrieve that session's full transcript or metadata. The `_handle_session_export` handler in `api/routes.py` loaded the session purely by identifier without verifying that the session's `profile` attribute matches the active profile of the requesting user [ref_id=2]. Because the session list endpoint (`/api/sessions`) already scoped results to the active profile, the by-id endpoints created a direct authorization bypass [CWE-639].
What the fix does
The patch adds a `_profiles_match(getattr(s, 'profile', None), active_profile)` check in `_handle_session_export` and a `_session_visible_to_active_profile` guard in `handle_get` before serializing or returning any session data [patch_id=6466839]. If the session's profile does not match the active profile, the handler returns a generic `404` ("Session not found") instead of the transcript, preventing both data exfiltration and the ability to distinguish a foreign session from a nonexistent one. The same check is also applied to the CLI-session fallback path.
Preconditions
- authThe attacker must be an authenticated user of Hermes WebUI with a valid session cookie.
- inputThe attacker must know or guess a session identifier that belongs to a different Hermes profile.
- configThe target session must exist in a profile other than the attacker's active profile.
Generated on Jun 18, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/nesquena/hermes-webui/commit/2a3baa71b81ca92da8ece8616a09f15894beec71mitrepatch
- www.vulncheck.com/advisories/hermes-webui-cross-profile-session-data-exfiltration-via-session-export-endpointmitrethird-party-advisory
- github.com/nesquena/hermes-webui/pull/3991mitretechnical-description
- github.com/nesquena/hermes-webui/pull/4269mitreissue-tracking
- github.com/nesquena/hermes-webui/releases/tag/v0.51.443mitrerelease-notes
News mentions
0No linked articles in our index yet.