CVE-2026-133705 in Hankoinfo

Summary

by MITRE • 11/20/2026

Hanko before 3.2.0 contains an open redirect vulnerability in Saml.IsAllowedRedirect that allows unauthenticated attackers to bypass the redirect allowlist by appending attacker-controlled domain suffixes to allowed hostnames. Attackers can lure victims through a crafted /saml/auth login link to capture the one-time hanko_token and redeem it without PKCE to hijack the victim's session.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 11/20/2026

The vulnerability identified in Hanko versions prior to 3.2.0 represents a critical authentication bypass mechanism rooted in improper validation of Uniform Resource Identifiers during the SAML-based login flow. Specifically, the flaw resides within the Saml.IsAllowedRedirect function, which is responsible for validating redirect URIs against an allowlist of permitted domains. The core technical deficiency lies in the logic used to match incoming request hosts against this whitelist; rather than performing a strict domain comparison or checking for exact matches, the implementation appears to rely on substring matching or insufficient boundary checks. This allows unauthenticated attackers to craft malicious URLs that append attacker-controlled domain suffixes to legitimate allowed hostnames. For instance, if example.com is an allowed redirect target, an attacker could potentially use subdomains like evil.example.com or even more complex variations depending on the specific implementation details of the string comparison logic, thereby tricking the application into accepting a redirect URI that ultimately leads to a malicious endpoint controlled by the adversary.

This open redirect vulnerability serves as the initial vector for a sophisticated session hijacking attack chain. Once an attacker constructs a crafted login link containing the manipulated SAML authentication request with the poisoned redirect URI, they can distribute this link through various social engineering tactics such as phishing emails or compromised websites. When a victim interacts with this link and initiates the authentication process via Hanko's identity provider, the system processes the request and, due to the validation flaw, approves the malicious redirect destination. Upon successful authentication, instead of returning the user to their intended application context within the trusted domain, the browser is redirected to the attacker-controlled endpoint. This redirection occurs in a manner that preserves the session state information generated during the login process, specifically including the one-time hanko_token issued by the identity provider.

The operational impact of this vulnerability extends beyond simple phishing or credential harvesting; it directly facilitates unauthorized access to user sessions without requiring additional authentication factors like Proof Key for Code Exchange (PKCE). In standard OAuth 2.0 and OIDC flows involving SAML, PKCE is designed to prevent authorization code interception attacks by ensuring that the token request originates from the same client that initiated the flow. However, in this specific scenario, the attacker leverages the open redirect to capture the hanko_token directly or intercept it during the redirection phase. Because the victim has already authenticated successfully with their credentials, the resulting session is valid and active. The attacker can then redeem this captured token without needing PKCE validation, effectively bypassing a key security control intended to protect against token theft. This results in complete account takeover, allowing the adversary to act as the legitimate user within the dependent application integrated with Hanko.

From an industry standards perspective, this vulnerability aligns closely with CWE-601, which describes URL Redirection to Untrusted Site (Open Redirect). The failure to properly validate and sanitize redirect URIs against a strict allowlist is a classic example of insufficient input validation in security-critical functions. Furthermore, the exploitation technique maps directly to MITRE ATT&CK techniques related to Phishing for Information and Account Manipulation. Specifically, it falls under T1566.002 (Spearphishing Link) as the initial access vector, followed by T1078 (Valid Accounts) or more specifically mechanisms associated with session hijacking where valid credentials are obtained through social engineering combined with technical exploitation of trust relationships between services. The lack of PKCE enforcement in this context also highlights a deviation from best practices outlined in RFC 7636 for OAuth 2.0 Public Clients, which mandates the use of PKCE to mitigate authorization code interception attacks.

To mitigate this vulnerability and prevent similar issues in future implementations, it is imperative that developers enforce strict domain validation logic when handling redirect URIs. This involves implementing exact string matching or using robust URL parsing libraries that correctly identify hostnames without allowing substring overlaps that could lead to subdomain spoofing. Additionally, the implementation of PKCE should be mandatory for all public clients interacting with the identity provider, ensuring that even if a token is intercepted via an open redirect, it cannot be redeemed by an unauthorized party lacking the corresponding code verifier. Regular security audits and static analysis tools configured to detect CWE-601 patterns can help identify such flaws early in the development lifecycle. Organizations relying on Hanko for authentication should immediately upgrade to version 3.2.0 or later where these validation checks have been corrected, thereby closing the gap that allows unauthenticated attackers to bypass security controls and hijack user sessions through crafted SAML login links.

Responsible

VulnCheck

Reservation

11/20/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!