CVE-2026-9368: NousResearch hermes-agent Environment Variable code_execution_tool.py execute_code sandbox
A vulnerability was identified in NousResearch hermes-agent up to 2026.4.16. This impacts the function executecode of the file tools/codeexecutiontool.py of the component Environment Variable Handler. Such manipulation leads to sandbox issue. It is possible to launch the attack 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Remove
Remove
NousResearch hermes-agentfrom your environment.Uninstall or remove the hermes-agent from systems where it is not required. If the agent is required, do not deploy or re-enable it until a vendor-provided fix is available.
- Configuration
Disable or neutralize the execute_code function in tools/code_execution_tool.py (for example, remove or comment out calls to execute_code, replace its body to return immediately, or remove execute permissions on the tool) until an official vendor fix is available.
NousResearch hermes-agent (Environment Variable Handler - tools/code_execution_tool.py) execute_code = disabled - Compensating control
Restrict network access to hosts running hermes-agent: block or limit inbound access to the agent's management/endpoints to trusted IPs only, isolate affected hosts from untrusted networks, and apply network-level controls (firewall/ACL) or WAF rules to prevent remote exploitation.
- Operational
Assume possible exploitation where the agent was exposed: perform incident response and forensic investigation on affected hosts, look for signs of compromise related to code execution, and remediate any discovered compromise before restoring services. Rotate any credentials that may have been exposed if compromise is confirmed or suspected.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-9368?
CVE-2026-9368 has a severity rating of 7.3, which is considered high.
How do I fix CVE-2026-9368?
To fix CVE-2026-9368, upgrade to the latest version of NousResearch hermes-agent that addresses this vulnerability.
What components are affected by CVE-2026-9368?
CVE-2026-9368 affects the Environment Variable Handler in the execute_code function of tools/code_execution_tool.py.
Can CVE-2026-9368 be exploited remotely?
Yes, CVE-2026-9368 can be exploited remotely due to the nature of the vulnerability.
What impact does CVE-2026-9368 have on system security?
CVE-2026-9368 may lead to potential sandbox escape issues, compromising the security environment.