CVE-2026-49958: Hermes WebUI < 0.51.303 TOCTOU Race Condition via git_discard
Hermes WebUI before version 0.51.303 contains a time-of-check time-of-use (TOCTOU) race condition vulnerability in the gitdiscard function within api/workspacegit.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 saferesolvews() 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Hermes WebUIto a version that resolves this vulnerability.Fixed in 0.51.303 - Compensating control
Temporarily restrict access to Hermes WebUI endpoints that can trigger the workspace git discard/delete functionality to trusted users until the upgrade to 0.51.303 is applied.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-49958?
CVE-2026-49958 has a severity rating of medium, classified as 4.3.
What does CVE-2026-49958 affect?
CVE-2026-49958 affects versions of Hermes WebUI prior to 0.51.303.
How do I fix CVE-2026-49958?
To fix CVE-2026-49958, update Hermes WebUI to version 0.51.303 or later.
What type of vulnerability is CVE-2026-49958?
CVE-2026-49958 is classified as a time-of-check time-of-use (TOCTOU) race condition vulnerability.
What can attackers do with CVE-2026-49958?
Attackers exploiting CVE-2026-49958 can delete files outside the configured workspace boundary.