CVE-2026-49959: Hermes WebUI < 0.51.311 RCE via Git Configuration Injection
Hermes WebUI before version 0.51.311 contains a remote code execution vulnerability that allows authenticated attackers to execute arbitrary commands by placing malicious executable Git configuration in a workspace repository's .git/config file. Attackers can exploit Git subprocess invocations in api/workspacegit.py through vectors such as core.fsmonitor during git status, protocol.ext.allow with ext:: remotes during git fetch, credential.helper, core.askPass, core.gitProxy, or inherited environment variables including GITSSHCOMMAND to achieve arbitrary command execution on the host running the application.
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.311 - Configuration
Disable or restrict Git protocol.ext.allow use of ext:: remotes during git fetch invoked by api/workspace_git.py to prevent ext:: remote execution chains.
Git protocol.ext.allow = ext:: (remove/disable extension execution via ext:: remotes) - Configuration
Ensure Git subprocess invocations used by api/workspace_git.py do not honor attacker-controlled credential.helper settings (disable/clear credential helpers for these subprocesses).
Git credential.helper = (disable/ignore attacker-controlled credential helpers) - Configuration
Ensure Git subprocess invocations used by api/workspace_git.py do not use attacker-controlled core.askPass (disable/clear core.askPass for these subprocesses).
Git core.askPass = (disable/ignore askPass) - Configuration
Ensure Git subprocess invocations used by api/workspace_git.py do not use attacker-controlled core.gitProxy (disable/clear core.gitProxy for these subprocesses).
Git core.gitProxy = (disable/ignore git proxy) - Compensating control
Prevent/limit how Hermes WebUI interacts with untrusted workspace repositories so that attackers cannot supply malicious Git configuration in a repository’s .git/config (e.g., ensure only trusted repositories/workspaces are processed, and treat any user-controlled workspace Git content as untrusted before running git subprocesses).
- Compensating control
Harden the execution environment for Git subprocesses invoked by api/workspace_git.py by removing/inhibiting inherited environment variables that can influence command execution (including GIT_SSH_COMMAND), so untrusted repository input cannot trigger arbitrary host commands.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-49959?
CVE-2026-49959 has a high severity rating of 8.7.
How do I fix CVE-2026-49959?
To fix CVE-2026-49959, upgrade Hermes WebUI to version 0.51.311 or higher.
What type of vulnerability is CVE-2026-49959?
CVE-2026-49959 is a remote code execution vulnerability due to Git configuration injection.
Who can exploit CVE-2026-49959?
CVE-2026-49959 can be exploited by authenticated attackers.
What components are affected by CVE-2026-49959?
CVE-2026-49959 affects Hermes WebUI versions prior to 0.51.311.