CVE-2026-49958
JSON

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 packageVersionsReported by
nesquena hermes-webuibefore 0.51.303CVE List

All scores

VulnCheck4.3medium CVSS:4.0CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:A/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
VulnCheck5.0medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:H

Classification

CWE-367

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

Sources

SourceRecordLicence
CVE ListCVE-2026-49958 changed 2026-11-08CVE Terms of Use
NVDCVE-2026-49958 changed 2026-07-23Public domain