Severity:

HIGH RISK

(7.3)

Missing Authorization in Hermes-Agent Batch Runner

CVE-2026-9350

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862, CWE-863

Impact:

Unauthorized Action / Privilege Abuse

Severity:

HIGH RISK

(7.3)

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 up to 2026.4.16 contains a missing authorization issue in the check_all_command_guards function of tools/approval.py, within the Batch Runner component.

A remote attacker can potentially invoke or bypass command guard logic without proper permission checks, enabling unauthorized actions once they can reach the affected interface.

Affected context

The vulnerability arises in deployments of hermes-agent that expose the Batch Runner functionality, either directly or via an API or orchestration layer.

Specifically, the check_all_command_guards function in tools/approval.py is responsible for enforcing guard or approval checks on batch commands but does not reliably verify the actor's authorization.

Where hermes-agent is used to automate or orchestrate commands, tasks, or tool invocations on behalf of users, this missing authorization logic becomes risky because it assumes that callers are trusted or already vetted.

Exploit preconditions

  • Attack surface: Remote interface to hermes-agent's Batch Runner (e.g., HTTP API, RPC endpoint, or other network-accessible integration point).
  • Required access: Network-level access to the hermes-agent instance; no valid user identity or elevated role is necessarily required if the batch-triggering interface is exposed.
  • Trigger point: Invocation of batch operations or commands that rely on check_all_command_guards to enforce approvals or guardrails.
  • Why exploitation is possible: The guard-checking function either omits authorization checks, performs them incompletely, or assumes trust in caller context, allowing an attacker to trigger guarded commands without appropriate permissions.

Why this happens

This vulnerability is a classic case of missing authorization (CWE-862) combined with aspects of improper authorization (CWE-863).

The check_all_command_guards function appears to validate that commands meet certain guard or approval criteria, but it does not robustly confirm that the caller is authorized to execute those commands or bypass safeguards.

At an abstract level, the code couples enforcement to the presence of guard configuration rather than to a clear access-control decision tied to an authenticated principal and a defined privilege model.

As a result, the system treats potentially untrusted requests as if they are allowed to bypass or satisfy guard requirements, leading to unauthorized operations.

Potential impact

  • Execution of commands or batch tasks without the intended approval or review.
  • Unauthorized use of tools or integrations that hermes-agent can access (e.g., file systems, APIs, CI/CD tasks, infrastructure actions).
  • Privilege abuse where low-privilege users or anonymous callers can trigger high-impact operations.
  • Lateral movement or environment manipulation if the agent orchestrates actions in other systems.
  • Integrity and availability impacts on downstream systems controlled or automated by the Batch Runner.

General mitigation guidance

Mitigation focuses on establishing explicit, enforceable authorization boundaries around batch execution and command guards:

  • Introduce a clear access-control layer that evaluates every incoming batch or command request against an authenticated identity and role, independent of guard configuration.
  • Model permissions explicitly (e.g., per-command, per-tool, or per-resource scopes) and ensure check_all_command_guards consults this model rather than assuming trust.
  • Apply the principle of least privilege by limiting which accounts or services can reach the Batch Runner interface and what actions they can perform.
  • Treat guard and approval mechanisms as additional defense-in-depth, not as a replacement for proper authorization.
  • When designing new tools or commands for hermes-agent, define required permissions and ensure they are enforced before any action is executed.

How teams detect issues like this

Detection typically targets weak or missing access-control paths:

  • Static analysis: Search for calls to check_all_command_guards and related execution paths where no prior authorization check is performed, or where authorization results are not enforced.
  • Code review signals: Look for functions that:
  • Accept remote input and trigger actions but do not reference authentication/authorization components.
  • Use comments like "TODO auth" or "trusted environment only" as a justification for skipping checks.
  • Rely solely on configuration flags or guard lists without tying them to user identity or roles.
  • Policy enforcement: Use security review checklists that require explicit authorization around any command execution or automation entrypoint.
  • Runtime monitoring: Correlate logs of batch executions with caller identity; flag executions lacking an associated authenticated principal or occurring from unexpected sources.
  • Automated application security testing tools can be configured to probe exposed Batch Runner endpoints and verify that unauthorized requests cannot trigger guarded actions.

Sources

SourceLink
gist.github.comgist.github.com/YLChen-007/22cada4c9060f5123dde6185135ae3ab
vuldb.comvuldb.com/submit/812213
vuldb.comvuldb.com/vuln/365313
vuldb.comvuldb.com/vuln/365313/cti

Frequently asked

questions

Yes. The issue can be triggered remotely if an attacker can reach the Batch Runner or any interface that routes to check_all_command_guards, because the authorization layer is incomplete or absent.

The attacker typically needs only network access to the hermes-agent instance or the service that exposes Batch Runner capabilities. They may not need valid credentials if the endpoint is not protected by strong authentication and authorization.

Introduce a centralized, consistent authorization check before any batch or command execution, using an explicit permission model tied to authenticated identities. Ensure check_all_command_guards is invoked only after these checks pass, and treat it as an additional approval mechanism rather than the primary access-control gate.

Adopt a "secure by design" access-control strategy: define resources and actions, require authentication for all state-changing operations, enforce authorization at every entrypoint, and mandate security reviews for any new feature that triggers commands or automations. Incorporating static analysis and access-control-focused code review practices into the development lifecycle also reduces the likelihood of missing authorization paths.

Find out what's already
exploitable in your codebase.