Summary
Hermes WebUI contains an improper access control flaw in its initial setup flow that allows unauthenticated attackers to set the first administrative password via the settings API.
By sending a crafted request during the first-run setup window, an attacker can take over the instance, establish a valid session, and prevent the legitimate operator from completing setup.
Affected context
The vulnerability arises in Hermes WebUI deployments that are in their initial "first run" setup state and expose the web interface over a reachable network.
During this setup window, the settings API endpoint accepts the _set_password parameter without enforcing authentication or network origin restrictions, allowing anyone with network access to the interface to attempt to complete the setup.
Exploit preconditions
- Attack surface: HTTP(S) settings API endpoint of Hermes WebUI during first-run setup
- Required access: Network reachability to the WebUI (local network, VPN, or internet-exposed)
- Trigger point: Submitting a POST request with the
_set_passwordparameter to the settings endpoint while no administrator account is yet finalized - Why exploitation is possible: The initial setup flow does not enforce authentication or origin checks before accepting a password hash and issuing a session, allowing unauthenticated callers to claim the first administrator credentials
Why this happens
This issue stems from missing or incomplete authentication checks on a security-critical action—setting the initial administrative password.
Instead of requiring proof of control (such as a bootstrap token, local-only access, or prior authentication), the application trusts any caller to submit _set_password during the first-run configuration phase.
This maps to CWE-306: Missing Authentication for Critical Function, where a function that establishes or controls authentication state is exposed without proper access control or origin validation.
Potential impact
- Unauthenticated attackers may set an arbitrary administrative password hash.
- Attackers can obtain a valid session cookie and full administrative control of the instance.
- Legitimate operators can be locked out from completing or accessing their own deployment.
- Compromised instances may be used to exfiltrate or alter data managed through the WebUI.
- The compromised interface could become a foothold for broader infrastructure attacks depending on integrations.
General mitigation guidance
Mitigation generally focuses on hardening the initial setup process and reducing trust in unauthenticated network traffic:
- Require an out-of-band bootstrap secret, setup token, or one-time code before allowing password initialization.
- Restrict the first-run setup interface to trusted origins or localhost-only access by default.
- Enforce authentication or strong capability checks before accepting any password-setting or account-creation actions.
- Separate configuration write operations behind explicit privilege checks, even during setup.
- Apply least-privilege principles to internal components so that compromising the WebUI does not grant unnecessary downstream access.
How teams detect issues like this
Detection can be approached through a mix of code-level and operational controls:
- Static analysis and code review rules that flag routes or endpoints performing authentication or password-related operations without explicit access control middleware.
- Security reviews focused on "first run" or installation flows, looking for unauthenticated configuration or account-creation steps.
- Web server and application logs that highlight early POST requests to the settings endpoint, especially those containing
_set_passwordfrom unexpected IP ranges. - Automated security testing (DAST) designed to probe installation and onboarding paths for missing authentication and origin checks.

