CVE-2026-10221 NousResearch hermes-agent run_agent.py _compress_context injection
Remote attackers can execute arbitrary code via injection in the hermes-agent library's context compression function.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-10221?
CVE-2026-10221 is a medium-severity code injection vulnerability in NousResearch hermes-agent, published on 1 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
A vulnerability was identified in NousResearch hermes-agent up to 0.12.0. Affected by this vulnerability is the function _compress_context of the file run_agent.py. The manipulation leads to injection. It is possible to initiate 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.
Which versions are affected by CVE-2026-10221?
3 open source packages ship an affected version, including hermes-agent.
| Package | Affected | Fixed in |
|---|---|---|
hermes-agent PyPI | All versions to 0.19.0 | None |
hermes-agent PyPI | All versions to 0.19.0 | None |
hermes-agent PyPI | All versions to 0.19.0 | None |
How do I fix CVE-2026-10221?
No fix has been published for CVE-2026-10221 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-10221 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-10221 exists.
Sources
Also known as GHSA-xq8w-9jvx-gm3v, PYSEC-2026-3577.