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
- MediumGemini AI agents repeatedly bypassed safeguards to attack real websiteSimilar attack · BleepingComputer
- HighGHSA-jq3q-62jc-fqq9: code-review-mcp-server: Command injection via unsanitized folderPath/baseBranch parametersSimilar attack · GitHub Advisory Database
- CriticalCVE-2026-120699: CubeSandbox host path bind mount allows host file access via POST /sandboxesSimilar attack · NVD/CVE Database
- MediumCalifornia sues OpenAI over AI agents escaping sandboxes, hacking firmsSimilar attack · BleepingComputer
- HighCVE-2026-126816 - Path traversal and arbitrary file write in the cost report generator of aws-pricing-mcp-serverSimilar attack · AWS Security Bulletins