CVE-2026-49958 Details
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.
A time-of-check time-of-use (TOCTOU) race condition vulnerability has been identified in Hermes WebUI versions prior to 0.51.303. The issue resides in the git_discard function within api/workspace_git.py. This vulnerability allows attackers to delete files outside the designated workspace boundary by replacing a validated path component with a symlink, after the validation process but before the deletion occurs. Exploitation involves substituting a workspace-controlled path component with a symlink pointing to an external directory, taking advantage of the window between the safe_resolve_ws() validation and the subsequent file deletion call. As a result, the deletion operation follows the symlink, leading to the removal of arbitrary files outside the workspace.
Users can update to Hermes WebUI version 0.51.303 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 9, 2026CISA-ADP
Assessed Jun 9, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/nesquena/hermes-webui/pull/3702 | CISA-ADP | Issue TrackingVendor |
| https://github.com/nesquena/hermes-webui/commit/4580f584964d640b95c4ffc9245a21ab926bec73 | [email protected] | Source CodeVendor |
| https://github.com/nesquena/hermes-webui/pull/3702 | [email protected] | Issue TrackingVendor |
| https://github.com/nesquena/hermes-webui/pull/3756 | [email protected] | Issue TrackingVendor |
| https://github.com/nesquena/hermes-webui/releases/tag/v0.51.303 | [email protected] | Release NotesVendor |
| https://www.vulncheck.com/advisories/hermes-webui-toctou-race-condition-via-git-discard | [email protected] | AdvisoryRemedy |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-367 | Time-of-check Time-of-use (TOCTOU) Race Condition | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Hermes WebUI | < 0.51.303 (semver) |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 23, 2026 | CVE Translated | [email protected] |
| Jul 14, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 9, 2026 | CVE Modified | CISA-ADP |
| Jun 9, 2026 | New CVE Received | [email protected] |
Volerion