/

CVE-2026-71963

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in Hermes Agent Assistant

CVE-2026-71963

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution and Credential Exposure

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Hermes Agent versions 0.18.2 through 0.21.0 can execute attacker-controlled operating system commands when a user opens a malicious Git repository and sends a message. A crafted repository configuration can cause a Git status refresh to run the command in the user's process context, potentially exposing environment variables such as provider API keys.

Affected context

The vulnerability occurs in Hermes Agent workflows that open or process repositories under an affected version. Risk is present when Git configuration from an untrusted repository is honored, the agent performs a status or index refresh after user interaction, and the agent process has access to sensitive environment variables or other local resources.

Exploit preconditions

  • Attack surface: Repository-processing and Git integration functionality in Hermes Agent
  • Required access: The attacker must be able to provide or distribute a malicious repository that a user opens
  • Trigger point: A subsequent agent interaction that causes a Git status or index refresh
  • Why exploitation is possible: Git configuration values from the repository can influence command execution without sufficient trust-boundary enforcement

Why this happens

The underlying flaw is command injection through unsafe handling of repository-controlled Git configuration. A repository setting that selects an external file-system monitor command is treated as trusted operational configuration, allowing a process-launching Git feature to invoke attacker-controlled behavior.

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because untrusted repository data reaches an operating-system command execution path without adequate restriction or isolation.

Potential impact

  • An attacker could execute arbitrary OS commands in the user's process context
  • The agent process could be compromised
  • Environment variables, including provider API keys, could be exposed
  • Local files and accessible repositories could be read or modified
  • The compromised process could be used for further lateral movement or data theft

General mitigation guidance

Mitigation generally focuses on treating repository metadata as untrusted input and preventing repository-controlled configuration from selecting executable behavior.

Common defensive patterns include:

  • Disable or tightly restrict Git features that invoke external commands when processing untrusted repositories
  • Use allowlists for executable integrations and reject repository-supplied command configuration
  • Isolate repository analysis in a low-privilege sandbox with restricted filesystem and network access
  • Avoid exposing provider credentials and other secrets in the agent process environment
  • Apply least-privilege permissions to the agent and separate sensitive workloads from repository-processing tasks
  • Require explicit trust decisions before enabling repository hooks, monitors, or other executable extensions

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis of Git integration code for process execution influenced by repository metadata
  • Code review checks for external-command settings, hooks, monitors, and other executable configuration
  • Repository ingestion policies that reject or neutralize untrusted executable Git settings
  • Runtime monitoring for unexpected child processes spawned by the agent or Git operations
  • Alerts for access to environment variables, credential stores, or sensitive files during repository processing
  • Automated security review tools that flag command construction or process-launch APIs using untrusted configuration

Sources

SourceLink
github.comgithub.com/NousResearch/hermes-agent/commit/f6234d00c5d59450adea1d7edd30ad3859375c79
github.comgithub.com/NousResearch/hermes-agent/pull/101483
manifold.securitymanifold.security/blog/ai-coding-agents-git-hijack
vulncheck.comvulncheck.com/advisories/hermes-agent-rce-via-git-core-fsmonitor-config-injection

Frequently asked

questions

It can be triggered through a malicious repository supplied to a user, but successful exploitation generally depends on the user opening or processing that repository with an affected Hermes Agent version.

The attacker needs to provide a repository containing crafted configuration that the agent will process. They do not necessarily need direct access to the victim's host.

Treat all repository-controlled Git configuration as untrusted, prevent it from selecting executable commands, and isolate repository processing with minimal privileges.

Enforce trust boundaries around Git metadata, review all process-launch paths, limit agent credentials and environment secrets, and monitor unexpected child processes during repository operations.

Find out what's already
exploitable in your codebase.