CVE-2026-49958

Hermes WebUI < 0.51.303 TOCTOU Race Condition via git_discard

Published Jun 9, 2026 CVSS 4.0 · 4.3 Medium EPSS < 1% KEV · Not listed
Description
Hermes WebUI before version 0.51.303 contains a time-of-check time-of-use (TOCTOU) race condition vulnerability in the git_discard function within api/workspace_git.py that allows attackers to delete files outside the configured workspace boundary by replacing a validated path component with a symlink after validation but before deletion. Attackers can substitute a workspace-controlled path component with a symlink pointing to an external directory between the safe_resolve_ws() validation step and the subsequent Path.unlink() or shutil.rmtree() deletion call, causing the delete operation to follow the symlink and remove arbitrary files outside the workspace.

Analysis

AI-generated

Technical impact

Hermes WebUI before version 0.51.303 includes a time‑of‑check time‑of‑use race condition in the git_discard API function. The flaw is categorized under CWE‑367 and allows an attacker to delete files that are outside the intended workspace directory by replacing a validated path component with a symlink after the safe resolution step but before the unlink or remove operations. As a result, critical configuration or system files could be removed, leading to data loss, system instability, or further privilege escalation if the application runs with elevated privileges.

Affected Systems

The vulnerability affects Hermes WebUI installations by the vendor nesquena, specifically any release earlier than version 0.51.303. There is no indication that later releases contain the flaw.

Risk and Exploitability

With a CVSS score of 4.3 the vulnerability is considered medium severity, and the EPSS score is not available. It is not listed in the CISA known exploited vulnerabilities catalog. The exploitation requires remote or local interaction with the git_discard API and the ability to create or modify symlinked paths within the configured workspace; the attack vector is likely remote via the web interface. If the application runs with privileged system accounts, deleting arbitrary files could result in system compromise. The lack of an EPSS score suggests a lower probability of widespread exploitation, but the potential impact warrants remediation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Hermes WebUI to version 0.51.303 or later, which removes the TOCTOU race condition
  • If a patch is unavailable, disable or restrict access to the git_discard functionality to prevent unauthorized file deletions
  • Run the application with the least privilege necessary, ensuring it does not execute with elevated system permissions that would allow deletion of critical files

Generated by OpenCVE AI on June 9, 2026 at 20:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Get-hermes
Get-hermes hermes Web Ui
CPEs cpe:2.3:a:get-hermes:hermes_web_ui:*:*:*:*:*:*:*:*
Vendors & Products Get-hermes
Get-hermes hermes Web Ui
Type Values Removed Values Added
First Time appeared Nesquena
Nesquena hermes-webui
Vendors & Products Nesquena
Nesquena hermes-webui
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Hermes WebUI before version 0.51.303 contains a time-of-check time-of-use (TOCTOU) race condition vulnerability in the git_discard function within api/workspace_git.py that allows attackers to delete files outside the configured workspace boundary by replacing a validated path component with a symlink after validation but before deletion. Attackers can substitute a workspace-controlled path component with a symlink pointing to an external directory between the safe_resolve_ws() validation step and the subsequent Path.unlink() or shutil.rmtree() deletion call, causing the delete operation to follow the symlink and remove arbitrary files outside the workspace.
Title Hermes WebUI < 0.51.303 TOCTOU Race Condition via git_discard
Weaknesses CWE-367
References
Metrics cvssV3_1

{'score': 5, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:H'}

cvssV4_0

{'score': 4.3, 'vector': 'CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:A/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 8, 2026, 2:04 PM
Reserved
Jun 2, 2026, 4:30 PM
Status
Deferred
Published
Jun 9, 2026, 5:17 PM
Modified
Jul 23, 2026, 8:10 AM