Tool execution via context-scanner regex bypass
Published May 24, 2026 · Updated May 24, 2026
Prompt injection in Nous Research Hermes Agent 2026.4.23 allows context-dependent attackers to steer tools through poisoned project-context files. The _scan_context_content function in agent/prompt_builder.py uses single-qualifier regular expressions, returns unmatched content unchanged, and loaders append it to the system prompt. Exploitation requires a user to run Hermes in an untrusted repository; bypass text can then direct terminal, file, memory, or delegation tools with that user's access.
Summary
What happened
Prompt injection in Nous Research Hermes Agent 2026.4.23 allows context-dependent attackers to steer tools through poisoned project-context files. The _scan_context_content function in agent/prompt_builder.py uses single-qualifier regular expressions, returns unmatched content unchanged, and loaders append it to the system prompt. Exploitation requires a user to run Hermes in an untrusted repository; bypass text can then direct terminal, file, memory, or delegation tools with that user's access.
The record
- CVE
- CVE-2026-9366
- Published
- May 24, 2026
- Updated
- May 24, 2026
- Vendor
- Nous Research
- Product
- Hermes Agent
- Classifications
- CWE-74, CWE-707, T1204.002
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- May 24, 2026CVE publishedPublication date reported by the CVE source.
- May 24, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=2026.4.23
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Context-file scanner regex bypass PoCproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo