NousResearch hermes-agent Batch Runner approval.py check_all_command_guards authorization
Description
A vulnerability was identified in NousResearch hermes-agent up to 2026.4.16. This affects the function check_all_command_guards of the file tools/approval.py of the component Batch Runner. Such manipulation leads to missing authorization. The attack can be launched remotely. The exploit is publicly available and might be used. The vendor was contacted early about this disclosure but did not respond in any way.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A missing authorization in NousResearch hermes-agent's batch runner allows remote attackers to bypass command approval and execute arbitrary commands via prompt injection.
Vulnerability
The vulnerability resides in the check_all_command_guards() function in tools/approval.py (lines 736–759) of NousResearch hermes-agent up to version 2026.4.16. The function checks three environment variables (HERMES_INTERACTIVE, HERMES_GATEWAY_SESSION, HERMES_EXEC_ASK) to decide whether to enforce approval prompts for dangerous commands. If none of these variables are set, the function defaults to returning {"approved": True} (line 759), auto-approving all commands. The batch runner (batch_runner.py) creates AIAgent instances without setting any of these environment variables, causing every dangerous command to be automatically approved [1].
Exploitation
An attacker can craft a JSONL dataset containing prompt injection payloads that trigger dangerous commands. When the batch runner processes this dataset, the check_all_command_guards() function sees no interactive environment variables and returns approval for every command. No authentication or user interaction is required; the attack is launched remotely by supplying the malicious dataset to the batch runner [1].
Impact
Successful exploitation allows arbitrary command execution on the host machine with the privileges of the hermes-agent process. This leads to full compromise of confidentiality, integrity, and availability, as the attacker can execute any system command [1].
Mitigation
The vendor was contacted but did not respond, and no official fix has been released as of the publication date. Users should avoid using the batch runner with untrusted datasets. A workaround is to set one of the environment variables (e.g., HERMES_INTERACTIVE=1) to force approval prompts. The exploit is publicly available and may be added to CISA's Known Exploited Vulnerabilities catalog [1].
AI Insight generated on May 24, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1- Range: <=2026.4.16
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- gist.github.com/YLChen-007/22cada4c9060f5123dde6185135ae3abmitreexploit
- vuldb.com/submit/812213mitrethird-party-advisory
- vuldb.com/vuln/365313mitrevdb-entrytechnical-description
- vuldb.com/vuln/365313/ctimitresignaturepermissions-required
News mentions
0No linked articles in our index yet.