CVE-2026-49958: Time-of-check Time-of-use (TOCTOU) Race Condition in nesquena hermes-webui
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.
AI Analysis
Technical Summary
CVE-2026-49958 describes a TOCTOU race condition in nesquena's hermes-webui before version 0.51.303. The vulnerability exists in the git_discard function within api/workspace_git.py, where after a path is validated by safe_resolve_ws(), an attacker can substitute a workspace-controlled path component with a symlink to an external directory before the deletion operation (Path.unlink() or shutil.rmtree()) occurs. This allows deletion of arbitrary files outside the configured workspace boundary. The vulnerability requires local access with low privileges and user interaction, and the attack complexity is high.
Potential Impact
An attacker with limited privileges and user interaction can exploit this race condition to delete arbitrary files outside the intended workspace directory. This could lead to loss of important files or disruption of system operations. The impact is limited by the need for local access and the complexity of the attack, reflected in the medium severity rating and CVSS score of 4.3.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid running hermes-webui versions prior to 0.51.303 in untrusted environments or restrict access to trusted users only. Monitor vendor communications for updates regarding an official patch or workaround.
CVE-2026-49958: Time-of-check Time-of-use (TOCTOU) Race Condition in nesquena hermes-webui
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.
CVSS v4.0
Score 4.3medium
Affected software
pkg:github/nesquena/hermes-webuiRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-49958 describes a TOCTOU race condition in nesquena's hermes-webui before version 0.51.303. The vulnerability exists in the git_discard function within api/workspace_git.py, where after a path is validated by safe_resolve_ws(), an attacker can substitute a workspace-controlled path component with a symlink to an external directory before the deletion operation (Path.unlink() or shutil.rmtree()) occurs. This allows deletion of arbitrary files outside the configured workspace boundary. The vulnerability requires local access with low privileges and user interaction, and the attack complexity is high.
Potential Impact
An attacker with limited privileges and user interaction can exploit this race condition to delete arbitrary files outside the intended workspace directory. This could lead to loss of important files or disruption of system operations. The impact is limited by the need for local access and the complexity of the attack, reflected in the medium severity rating and CVSS score of 4.3.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid running hermes-webui versions prior to 0.51.303 in untrusted environments or restrict access to trusted users only. Monitor vendor communications for updates regarding an official patch or workaround.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-06-02T16:30:15.233Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a284d178dd33fbd85665a1c
Added to database: 06/09/2026, 17:27:51 UTC
Last enriched: 07/15/2026, 10:08:48 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 66
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.