Stay Updated with the Latest in Cybersecurity & Tech. Explore Anosion ↗

Hermes Agent OAuth Redirect Parsing Flaw Could Enable Session Takeover

Tenable found a Hermes Agent OAuth redirect parsing flaw that could expose authorization codes and enable session takeover. Upgrade guidance inside.

A security research advisory published by Tenable on October 9, 2026, describes a high-severity authentication flaw in Hermes Agent. The issue affects the agent's native authorization flow, in which redirect URI validation performed by Python and the subsequent interpretation of the URI by a browser can disagree about the intended destination.

The mismatch could allow an attacker to redirect an authorization response to an unintended origin and obtain information needed to take over a victim's authenticated session. Tenable reported that the issue affected Hermes Agent versions earlier than 0.21.6 and identified version 0.21.6 or later as the fixed release range.

Research Context

Hermes Agent is developed by Nous Research. Its native authentication flow includes a redirect URI intended to limit authorization responses to a local loopback destination.

Tenable researcher Joshua Martinelle documented how this security boundary could fail when the server and browser parse a specially crafted URI differently. The advisory notes that another researcher independently identified the same vulnerability during the disclosure process.

The finding highlights a broader software-security principle: validating a URL with one parser and then passing the original, unnormalized string to another component can create inconsistent security decisions.

Technical Explanation

Where the Validation Breaks Down

Tenable's analysis focuses on the public GET /auth/native/authorize flow. The application validates a supplied redirect_uri using Python's urllib.parse.urlparse.

The validation checks the hostname that Python's parser identifies. However, the application then returns the original URI rather than a consistently normalized and validated value.

Browsers use URL-parsing rules that do not always interpret backslashes in the same way as Python's parser. Consequently, the two components can disagree about which host will receive the final navigation.

Under the researcher's documented test conditions, a URI classified by the server as loopback could be interpreted by the browser so that the authorization response is sent to a different origin.

Why the Authorization Code Matters

Modern authorization flows commonly use Proof Key for Code Exchange (PKCE) to reduce the risk of authorization-code interception.

In this case, Tenable described a scenario in which an attacker can control the PKCE challenge while exploiting the redirect parsing discrepancy. If the authorization code and associated state are delivered to an attacker-controlled origin, that attacker may be able to exchange the code for the victim's tokens.

The result can be a full session takeover. The problem is not that PKCE is inherently ineffective; it is that the surrounding redirect validation can undermine the assumptions on which the authorization flow relies.

Impact and Limitations

Tenable rated the issue High and assigned it a CVSS v4.0 base score of 8.6 in its advisory. The affected product range is Hermes Agent versions earlier than 0.21.6.

The demonstrated impact involves exposure of authorization material and potential account session takeover. That is different from a claim that every Hermes Agent installation, every authentication flow, or every account was compromised.

The research advisory documents the parser discrepancy and the potential consequences under the described conditions. It does not by itself demonstrate that the vulnerability was broadly exploited in the wild.

The issue also illustrates a recurring class of design errors that can appear in authentication callbacks, URL allowlists, local application integrations, and OAuth implementations that move between server-side and browser-side URL handling.

Mitigation and Recommendations

Upgrade the Agent

Tenable recommends upgrading to Hermes Agent version 0.21.6 or later. Administrators should verify the installed version and use a current release supported by the project.

Normalize Before Validating

For developers implementing authorization redirects, the safer design is to apply strict, consistent parsing and normalization before making a security decision.

The application should validate the final URI that will actually be used for navigation, reject unexpected URL components, and avoid returning an untrusted raw URI after making a security decision on a differently interpreted representation.

Strengthen OAuth Controls

Developers should also:

  • Bind authorization requests to unpredictable, validated state values.

  • Preserve the intended PKCE behavior and verify the associated challenge during code exchange.

  • Restrict redirect destinations to explicitly approved origins.

  • Test malformed URLs across the parsers used by the application and browser.

  • Avoid placing authorization codes in locations that can be received by untrusted origins.

Security testing should cover the complete redirect flow rather than checking the server-side validation function in isolation.

Conclusion

The Hermes Agent finding demonstrates how inconsistent URL parsing can undermine an OAuth security boundary. The combination of loopback redirect validation, raw URI reuse, and browser interpretation can create a path to authorization-code disclosure and session takeover.

Upgrading to a fixed release is the immediate action for users. For software developers, the broader lesson is to normalize and validate the exact redirect destination used by the browser, not merely a different interpretation of the supplied string.

Sources

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.