Executive brief
NousResearch hermes-agent is an AI agent framework that can execute commands on a host system. A security flaw in its "Batch Runner" component allows dangerous commands to be executed automatically without the required user approval. An attacker who can provide a malicious dataset to the agent could potentially gain full control over the host machine, steal sensitive credentials, or delete critical data.
Technical details
A missing authorization vulnerability exists in the `check_all_command_guards` function within `tools/approval.py`. The root cause is an insecure default fallback: when the agent is run via `batch_runner.py`, it fails to set interactive environment variables (such as `HERMES_INTERACTIVE`), causing the safety logic to treat the execution context as safe and auto-approve all commands. An attacker can exploit this by embedding prompt injection payloads in JSONL datasets processed by the Batch Runner. This bypasses regex pattern matching and security scanning, leading to remote code execution (RCE) on the host machine. As of the advisory date, the vendor has not responded to the disclosure.
Affected products
- NousResearch hermes-agent up to 2026.4.16
Timeline
- 2026-04-24: disclosed: Initial discovery and PoC published on GitHub Gist
- 2026-05-24: advisory: CVE-2026-9350 published via VulDB/NVD