Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Local access and profile-switch permission required (AV:L, PR:L); impact limited to partial credential disclosure with no integrity or availability effect.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
7DescriptionCVE.org
nesquena hermes-webui contains an environment variable leakage vulnerability where profile switching does not clear environment variables from the previously active profile before loading the next profile. Attackers or users can exploit additive dotenv reload behavior to access provider API keys and other sensitive secrets from one profile context in another profile, breaking expected security isolation between profiles.
AnalysisAI
Environment variable leakage in nesquena/hermes-webui exposes provider API keys and other profile-scoped secrets across profile boundaries when users switch active profiles. The _reload_dotenv function in api/profiles.py loaded each new profile's .env additively into os.environ without first purging variables set by the previously active profile, meaning credentials such as OPENAI_API_KEY persisted beyond their intended security scope. No active exploitation has been observed (SSVC: Exploitation=none, EPSS 0.01% / 2nd percentile), but the flaw is a clear, reproducible confidentiality break confirmed by vendor source code diff and a VulnCheck advisory.
Technical ContextAI
hermes-webui (CPE: cpe:2.3:a:nesquena:hermes-webui:*:*:*:*:*:*:*:*) is a Python-based web UI for interacting with LLM providers, which organizes credentials and configuration into user-selectable profiles. Each profile stores provider API keys in a per-directory .env file loaded via the dotenv library into Python's os.environ. The vulnerability stems from the _reload_dotenv function applying dotenv loading in an additive fashion: the function wrote new profile variables into os.environ without tracking or removing the variables previously injected by the outgoing profile. CWE-668 (Exposure of Resource to Wrong Sphere) accurately describes the root cause - secrets from one security domain (profile A) persisted into another domain (profile B) due to the shared, unscoped os.environ state. The fix introduces a module-level _loaded_profile_env_keys set that tracks which environment variable keys were loaded per profile, explicitly purging them from os.environ at the start of each profile switch before loading the incoming profile's .env.
RemediationAI
Upgrade hermes-webui to the version that includes pull request #351, which is confirmed patched at commit 88dc8bbe26a6055161d3251b70f5cd3d3c5831b0 (https://github.com/nesquena/hermes-webui/commit/88dc8bbe26a6055161d3251b70f5cd3d3c5831b0). Verify the installed version incorporates the _loaded_profile_env_keys isolation logic in api/profiles.py by checking the commit history against the release tags at https://github.com/nesquena/hermes-webui/releases; the exact first patched release tag is not independently confirmed from available data. As a compensating control prior to patching, restrict profile-switching capability to a single trusted user per deployment and avoid storing high-value API keys in profile-scoped .env files - use a dedicated secrets manager (e.g., HashiCorp Vault or OS-level keyring) instead, injecting credentials at process start rather than via dotenv. The trade-off of this workaround is reduced per-profile credential isolation convenience until the patch is applied.
More in Hermes Webui
View allUnauthenticated remote code execution in Hermes WebUI before version 0.51.788 lets remote attackers run arbitrary shell
Authentication bypass in Hermes WebUI before 0.51.307 lets unauthenticated remote attackers reach onboarding endpoints t
Authentication bypass in Hermes WebUI before 0.51.409 allows unauthenticated remote attackers to register the first pass
Unauthenticated initial-setup hijack in Hermes WebUI before 0.51.358 allows any remote attacker who can reach the settin
Cross-profile authorization bypass in Hermes WebUI before 0.51.368 allows authenticated users to access sessions, files,
Arbitrary file deletion in Hermes WebUI (nesquena/hermes-webui, all versions prior to the PR #409 fix) allows an authent
Information disclosure in Hermes WebUI before v0.51.221 allows authenticated remote attackers to read arbitrary files ou
Cross-profile data disclosure in Hermes WebUI before 0.51.269 allows authenticated users to read session titles and tran
Cross-profile session data exfiltration in Hermes WebUI before 0.51.443 lets any authenticated user retrieve session tra
Cross-profile session disclosure in Hermes WebUI before 0.51.443 lets any authenticated user retrieve conversation trans
Resource exhaustion in Hermes WebUI before v0.51.270 allows unauthenticated remote attackers to degrade service availabi
Resource exhaustion in Hermes WebUI before 0.51.468 exposes an unauthenticated POST /api/onboarding/oauth/start endpoint
Same weakness CWE-668 – Exposure of Resource to Wrong Sphere
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-24515
GHSA-vvfr-g83f-8qcv