Hermes Agent
CVE-2026-53869
HIGH
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-reachable WebSocket with no auth (AV:N, PR:N), but DNS rebinding requires winning a TTL race (AC:H) and a victim browsing an attacker page (UI:R); PTY command injection yields full C/I/A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2Blast Radius
ecosystem impact- 1 pypi packages depend on hermes-agent (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 0.16.0.
DescriptionCVE.org
Hermes Agent before 0.16.0 contains a DNS rebinding vulnerability in WebSocket endpoints that allows remote attackers to bypass Host and Origin validation. FastAPI HTTP middleware does not execute for WebSocket upgrade requests on /api/pty, /api/ws, /api/pub, and /api/events endpoints, enabling attackers to exploit DNS rebinding and inject malicious commands or read terminal output.
AnalysisAI
DNS rebinding in NousResearch Hermes Agent prior to 0.16.0 allows remote attackers to reach privileged local WebSocket endpoints (/api/pty, /api/ws, /api/pub, /api/events) by tricking a victim's browser into resolving an attacker-controlled hostname to the agent's loopback address, bypassing Host and Origin checks. Because FastAPI HTTP middleware does not run on WebSocket upgrade requests, the validation layer is silently skipped, letting attackers inject commands into the PTY or stream terminal output. No public exploit has been identified at time of analysis, but VulnCheck reported the issue and an upstream patch is available.
Technical ContextAI
Hermes Agent exposes a FastAPI-based local control plane that brokers a pseudo-terminal (/api/pty), generic WebSocket channel (/api/ws), pub/sub (/api/pub), and server-sent events (/api/events). The vendor relies on HTTP middleware to enforce Host/Origin allow-lists as a defense against cross-origin attacks from a browser context, but Starlette/FastAPI runs middleware only on the HTTP request path - WebSocket upgrades short-circuit that pipeline and reach the endpoint handlers directly. This matches CWE-306 (Missing Authentication for Critical Function): a security-critical check exists in code but is not invoked on a reachable code path, so the WebSocket endpoints behave as if unauthenticated when targeted via DNS rebinding (where a malicious site rebinds its A record to 127.0.0.1 after the same-origin check is satisfied).
RemediationAI
Vendor-released patch: Hermes Agent 0.16.0 (release tag v2026.6.5, https://github.com/NousResearch/hermes-agent/releases/tag/v2026.6.5); the fix corresponds to upstream commit d9ec90585cf7616b5972e44cf8d92bb569fc3feb and PRs #30221 and #31685, which move Host/Origin validation into a WebSocket-aware dependency so it runs on upgrade requests. Operators who cannot upgrade immediately should bind the agent to a non-loopback interface only behind an authenticating reverse proxy, or firewall outbound DNS for the agent's listening host so browser-driven rebinding cannot resolve external names to 127.0.0.1 - note this breaks any legitimate browser-based local UI. As a lighter compensating control, restrict the listening port with a host firewall rule that allows only the local user's browser process (per-app firewall) or disable the /api/pty endpoint via configuration if PTY access is not needed, accepting loss of in-browser terminal features. Consult the VulnCheck advisory at https://www.vulncheck.com/advisories/hermes-agent-dns-rebinding-bypass-via-websocket-endpoints for current guidance.
More in Hermes Agent
View allRemote code execution in NousResearch Hermes Agent 0.18.2-0.21.0 allows an unauthenticated attacker to execute arbitrary
Remote command injection in NousResearch hermes-agent allows unauthenticated attackers to execute arbitrary OS commands
Path traversal in NousResearch hermes-agent (all versions through 2026.5.16) exposes arbitrary server-side files via the
Path traversal in NousResearch hermes-agent through version 2026.4.16 allows remote unauthenticated attackers to bypass
Remote sandbox escape in NousResearch hermes-agent versions up to 2026.4.16 allows unauthenticated attackers to manipula
Path traversal in NousResearch hermes-agent 0.8.0 exposes arbitrary server-side files to unauthenticated remote attacker
Remote code/prompt injection in NousResearch Hermes Agent through 0.12.0 stems from improper neutralization in the _comp
Remote injection in NousResearch Hermes Agent through version 2026.4.30 allows unauthenticated attackers to manipulate t
Code injection in NousResearch hermes-agent 2026.4.23 allows remote unauthenticated attackers to inject and execute arbi
Improper output escaping in NousResearch Hermes Agent versions up to 2026.4.16 allows remote unauthenticated attackers t
Remote injection vulnerability in NousResearch hermes-agent versions up to 2026.4.23 enables unauthenticated attackers t
Uncontrolled resource consumption in NousResearch hermes-agent (all versions through 2026.4.30) allows remote unauthenti
Same technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-4pqm-j46f-795x