# CVE-2026-49958: Hermes WebUI < 0.51.303 TOCTOU Race Condition via git_discard

- Severity: Medium 4.3 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.08%, higher than 0% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-09T16:35:42.411Z
- Modified: 2026-11-08T14:04:59.515Z
- Weaknesses: CWE-367
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- nesquena hermes-webui: before 0.51.303

## Every score

- VulnCheck: CVSS:4.0 4.3 Medium `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: CVSS:3.1 5.0 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:H`

## References

- <https://github.com/nesquena/hermes-webui/pull/3702> (exploit, issue-tracking, patch)
- <https://github.com/nesquena/hermes-webui/releases/tag/v0.51.303> (release-notes)
- <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

- CVE List: [CVE-2026-49958](https://www.cve.org/CVERecord?id=CVE-2026-49958), CVE Terms of Use, modified 2026-11-08
- NVD: [CVE-2026-49958](https://nvd.nist.gov/vuln/detail/CVE-2026-49958), Public domain, modified 2026-07-23

---

Page: https://cve.day/CVE-2026-49958 · Whole record: https://cve.day/CVE-2026-49958.json · Rebuilt by cve.day 2026-11-25T22:59:24.235Z
