4.3medium
Hermes WebUI < 0.51.303 TOCTOU Race Condition via git_discard
- Severity
- 4.3medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.08% (higher than 0% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nesquena hermes-webui | before 0.51.303 | CVE List |
All scores
| VulnCheck | 4.3medium CVSS:4.0 | 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 |
| VulnCheck | 5.0medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Hermes WebUI antes de la versión 0.51.303 contiene una vulnerabilidad de condición de carrera de tiempo de verificación a tiempo de uso (TOCTOU) en la función git_discard dentro de API/workspace_git.py que permite a los atacantes eliminar archivos fuera del límite del espacio de trabajo configurado reemplazando un componente de ruta validado con un enlace simbólico (symlink) después de la validación pero antes de la eliminación. Los atacantes pueden sustituir un componente de ruta controlado por el espacio de trabajo con un enlace simbólico (symlink) que apunta a un directorio externo entre el paso de validación safe_resolve_ws() y la subsiguiente llamada de eliminación Path.unlink() o shutil.rmtree(), haciendo que la operación de eliminación siga el enlace simbólico (symlink) y elimine archivos arbitrarios fuera del espacio de trabajo.
References
| https://github.com/nesquena/hermes-webui/releases/tag/v0.51.303 | release-notes | |
| https://github.com/nesquena/hermes-webui/pull/3702 | exploit, issue-tracking, patch | |
| https://github.com/nesquena/hermes-webui/pull/3756 | issue-tracking, patch | |
| https://github.com/nesquena/hermes-webui/commit/4580f584964d640b95c4ffc9245a21ab926bec73 | patch | |
| https://www.vulncheck.com/advisories/hermes-webui-toctou-race-condition-via-git-discard | third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-49958 changed 2026-11-08 | CVE Terms of Use |
| NVD | CVE-2026-49958 changed 2026-07-23 | Public domain |