CriticalVulnerability
Hermes Agent - PKCE Session Takeover via Redirect-URI Parser Confusion
- Published
- Record updated
Summary
Hermes Agent's public GET /auth/native/authorize flow validates redirect_uri with Python's urllib.parse.urlparse but returns the raw, unnormalized value to the browser after login. Python and the WHATWG browser parser handle backslashes differently, so a URL the server accepts as loopback (127.0.0.1) can send the browser to an attacker-controlled origin, which receives the authorization code and state. Because the attacker chooses the PKCE challenge, they can exchange the leaked code for the victim's tokens and take over the session.
Mitigation
The source does not state a fix yet. Check the original advisory for updates.
Related items
- MediumFamiliar weaknesses, exploited faster: defending against agentic cyber attacksSimilar attack · UK NCSC
- MediumHackers Exploit N-able MailAssure Flaw While AI Agents Exploit MONAI Label Zero-DaySimilar attack · The Hacker News
- HighCVE-2026-133448: AutoGPT Claude Code CLI prompt preprocessing bypasses tool allow-listSimilar attack · NVD/CVE Database
- CriticalCVE-2026-118285: Azure Machine Learning server-side request forgery allows privilege elevationSimilar attack · NVD/CVE Database
- HighCVE-2026-130164: Hermes Agent code execution via screen environment file mergeSimilar attack · NVD/CVE Database