CVE-2026-53871
Executive Summary
CVE-2026-53871 is an authorization bypass vulnerability in the Hermes WebUI application, specifically within the get_profile_cookie() function. This flaw allows an authenticated attacker to manipulate the hermes_profile cookie value, thereby bypassing profile-scoped authorization checks. Successful exploitation enables the attacker to access sessions, files, and resources that belong to different profiles, leading to unauthorized data exposure and potential lateral movement within the application.
The vulnerability is rooted in improper input validation and authorization logic, where the application trusts the profile name provided in the cookie without verifying that the authenticated user has the right to access that profile. This is a classic case of CWE-863 (Incorrect Authorization).
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Hermes WebUI is a web-based interface for managing Hermes, a message broker. The vulnerability exists in the core application logic, not in a third-party package. However, organizations using Hermes WebUI should verify the integrity of their deployment and ensure they are using a trusted source for the software. No known supply chain attacks have been reported for this specific CVE.
CVSS Breakdown & Threat Level
While a CVSS vector is not provided, based on the description, the vulnerability can be assessed as follows:
- Attack Vector (AV): Network (N) – The attack is performed over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): Low (L) – The attacker must be authenticated.
- User Interaction (UI): None (N) – No user interaction is required.
- Scope (S): Changed (C) – The vulnerability allows access to resources beyond the attacker's authorized scope.
- Confidentiality (C): High (H) – Sensitive data from other profiles can be accessed.
- Integrity (I): None (N) – The vulnerability does not allow modification of data.
- Availability (A): None (N) – The vulnerability does not affect availability.
Estimated CVSS Score: 8.1 (High)
Threat Level: High. The vulnerability is easy to exploit and can lead to significant data exposure.
Deep Dive & Mechanics
The vulnerability lies in the get_profile_cookie() function. This function is responsible for reading the hermes_profile cookie from the incoming HTTP request and using its value to determine which profile's resources to serve to the user.
The flawed logic does not validate that the profile name specified in the cookie belongs to the authenticated user. Instead, it blindly trusts the cookie value. An authenticated attacker can craft a request with a modified hermes_profile cookie, setting it to the name of another profile (e.g., admin or target_user). The application then loads the resources (sessions, files, etc.) associated with that profile, effectively bypassing the intended authorization boundary.
Attack Flow:
- Attacker authenticates to Hermes WebUI as a low-privileged user (e.g.,
user1). - Attacker intercepts a legitimate request and notes the
hermes_profilecookie (e.g.,hermes_profile=user1). - Attacker modifies the cookie value to target another profile (e.g.,
hermes_profile=admin). - Attacker sends the modified request to the server.
- The server's
get_profile_cookie()function reads the cookie and loads resources for theadminprofile. - The attacker gains unauthorized access to the admin's sessions, files, and other resources.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
def get_profile_cookie(request):
profile_name = request.cookies.get('hermes_profile')
# No validation that the profile belongs to the authenticated user
return profile_name
def get_profile_resources(request):
profile = get_profile_cookie(request)
# Load resources for the profile
resources = load_resources(profile)
return resources
Patched Code (Conceptual):
def get_profile_cookie(request, authenticated_user):
profile_name = request.cookies.get('hermes_profile')
# Validate that the profile belongs to the authenticated user
if not user_has_profile(authenticated_user, profile_name):
raise AuthorizationError("Invalid profile")
return profile_name
def get_profile_resources(request, authenticated_user):
profile = get_profile_cookie(request, authenticated_user)
resources = load_resources(profile)
return resources
The patched version introduces a validation step (user_has_profile()) that checks whether the authenticated user is authorized to access the specified profile before returning the profile name.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Access to a Hermes WebUI instance (version < 0.51.368).
- Valid credentials for any authenticated user.
Exploitation Steps:
Authenticate and Capture Cookie: Log in to the Hermes WebUI and capture the
hermes_profilecookie using browser developer tools or a proxy like Burp Suite.Identify Target Profiles: Enumerate possible profile names. Common targets include
admin,root, or other usernames.Forge the Cookie: Modify the
hermes_profilecookie value to the target profile name.Access Resources: Send a request to a resource endpoint (e.g.,
/sessions,/files) with the forged cookie.
Example Request (using cURL):
curl -X GET \
'http://target-hermes-webui/sessions' \
-H 'Cookie: hermes_profile=admin; session=valid_session_token'
Expected Outcome:
The server returns the sessions or files belonging to the admin profile, bypassing authorization.
Blue Team (Detection & Defense)
Detection:
- Monitor for multiple
hermes_profilecookie values from the same session ID. - Alert on requests where the
hermes_profilecookie value does not match the authenticated user's profile. - Log and analyze all access to sensitive endpoints (e.g.,
/sessions,/files).
Defense:
- Immediately upgrade to Hermes WebUI version 0.51.368 or later.
- Implement additional server-side validation of the
hermes_profilecookie. - Use Web Application Firewall (WAF) rules to block requests with suspicious cookie manipulation.
- Enforce strict session management and profile association.
Indicators of Compromise (IOCs)
Network:
- HTTP requests with modified
hermes_profilecookie values. - Repeated access to
/sessionsor/filesendpoints from the same session with different profile names.
- HTTP requests with modified
Logs:
- Application logs showing
AuthorizationErroror similar exceptions (if patched). - Logs indicating access to resources outside the user's assigned profile.
- Application logs showing
File System:
- Unauthorized access to files in directories belonging to other profiles.
Detection Engineering
YARA Rule
rule Detect_Hermes_Profile_Cookie_Manipulation {
meta:
description = "Detects attempts to manipulate the hermes_profile cookie in HTTP requests"
author = "Valters IT"
date = "2025-04-10"
hash = "d41d8cd98f00b204e9800998ecf8427e"
strings:
$cookie_name = "hermes_profile"
$suspicious_path = "/sessions" or "/files"
condition:
$cookie_name and $suspicious_path
}
Sigma Rule
title: Hermes WebUI Authorization Bypass via Cookie Manipulation
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with manipulated hermes_profile cookie
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- '/sessions'
- '/files'
cs-cookie|contains: 'hermes_profile'
condition: selection
falsepositives:
- Legitimate profile switching (if allowed by application)
level: high
Suricata Rule
alert http any any -> any any (msg:"Hermes WebUI Authorization Bypass - Cookie Manipulation"; flow:to_server; content:"hermes_profile"; http_cookie; content:"/sessions" or content:"/files"; http_uri; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade: Update Hermes WebUI to version 0.51.368 or later.
- Patch: If upgrading is not immediately possible, apply the conceptual patch by adding validation in the
get_profile_cookie()function. - WAF Rules: Deploy WAF rules to block requests with suspicious cookie values.
Long-Term Measures:
- Conduct a security audit of the application's authorization logic.
- Implement robust input validation and server-side authorization checks.
- Use secure coding practices to avoid trusting client-side data.
- Regularly update and patch all software components.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.