← All advisories

CVE-2026-140425highAgent hijacking2026-12-01

CVE-2026-140425: Hermes Agent's dashboard accepted any origin, so a page on another localhost port could steal its session token and run shell commands through /api/ws (fixed 0.22.7)

Hermes Agent 0.16.0 up to (not including) 0.22.7 served its web dashboard with a permissive CORS policy and a WebSocket origin check that trusted other localhost ports. Attacker-controlled content running on another local port could read the dashboard session token from GET /, open /api/ws, call shell.exec to run OS commands, and download files via /api/files/download. Fixed in 0.22.7.

01.

What it is

The dashboard web server (hermes_cli/web_server.py) let pages from other origins on localhost read responses and open its WebSocket.

The session token is embedded in the response to GET /. Any page served from a different localhost port (for example a dev server or a local web app showing attacker content) could fetch it, connect to /api/ws, invoke shell.exec and pull files through /api/files/download.

Affected: hermes-agent >= 0.16.0 and < 0.22.7 (CWE-1385, missing origin validation in WebSockets). Fixed by PR #146636 / commit 5e7c2b2 in v0.22.7. NVD published the CVE on 1 December 2026.

02.

How to check

  1. Run pip show hermes-agent and check the version is 0.22.7 or later.
  2. Check whether you run the Hermes dashboard while also serving other local web content on the same machine.
03.

How to fix

  1. Upgrade hermes-agent to 0.22.7 or later.
  2. Stop the dashboard when you are not using it, and avoid running untrusted local web servers next to it.
  3. If you ran an affected version alongside untrusted local pages, rotate the API keys and credentials the agent can reach.
pip show hermes-agent | grep -i '^version'
04.

Sources

Related on VibeVulns
More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.