Synopsis
Researchers associated with Tenable have discovered a 1-click open redirection technique in Amazon Cognito that can be triggered by abusing the OAuth error-handling mechanism. The vulnerability stems from AWS’s OAuth implementation validation sequence: if validation fails due to an unsupported scope, mismatched PKCE parameters, or an unsupported response type, the error handling processes the failure and automatically issues an HTTP redirect to an attacker-controlled redirect_uri.
Because the identity platform evaluates these specific errors before any user interaction, the victim is redirected immediately without needing to be authenticated or having an active session. The process completely bypasses the OAuth consent screen, login prompts, and any warning prompts, resulting in a seamless 1-click open redirection. Attackers can exploit this to abuse Amazon Cognito’s highly trusted domain reputation (*.amazoncognito.com) to bypass traditional anti-phishing mechanisms and facilitate credential theft or malware delivery
Proof of Concept:
Setup:
- Provision an Amazon Cognito User Pool and an associated OAuth App Client within an attacker-controlled AWS account.
- Configure the App Client’s redirect_uri to point to an attacker-controlled domain that hosts the phishing payload or malware.
- Other application configuration attributes are determined based on a specific attack path (see below for more details).
Attacker:
The attacker crafts a weaponized, yet structurally legitimate-looking, Amazon Cognito OAuth authorization link. By intentionally introducing parameter mismatches, the authorization server is forced into an error state. Four distinct error handling scenarios can fail open and trigger the automatic HTTP redirection:
- “invalid_scope” error: Triggered when the authorization request includes a scope parameter not explicitly bound to the App Client’s allowed scopes, or by utilizing fabricated scopes.
- “Missing_required_code_challenge_parameter” error: Exploits a malformed PKCE implementation by supplying either the code_challenge or code_challenge_method parameter in isolation.
- “Unsupported_code_challenge_method” error: Triggered when the request supplies a valid code_challenge but specifies an invalid or unsupported hashing algorithm (e.g., explicitly passing plain when Amazon Cognito enforces S256).
- “Unauthorized_client” error: Forced by creating a discrepancy between the response_type requested in the URI and the OAuth 2.0 grant types permitted within the App Client’s backend configuration.
The attacker sends a crafted link to the victim, depending on the scenarios, for example, for “invalid_scope” error:
https://[YOUR_DOMAIN].auth.[REGION].amazoncognito.com/oauth2/authorize?client_id=[YOUR_CLIENT_ID]&response_type=code&scope=fake).
Victim:
- The victim clicks on the crafted link. Because the identity platform evaluates these specific malformed parameters prior to any requisite user interaction, the authorization server processes the failure and issues an immediate HTTP redirect.
- The victim is seamlessly and instantaneously routed to the attacker-controlled redirect_uri. This sequence executes silently, completely bypassing any login screens, OAuth consent dialogues, or interstitial warning prompts, rendering the attack highly evasive.
Solution
AWS has not resolved the issue. AWS states:
“Based on our review, we do not consider this a security concern in Amazon Cognito. The service is operating as designed and in conformance with the OAuth 2.0 specification. As such, we will not be making changes to address this behavior at this time. We recognize that open redirection techniques can be used in phishing scenarios, and we appreciate your efforts to highlight this class of issue. We encourage users to remain vigilant about the links they click, even those originating from trusted domains.”
Disclosure Timeline
April 1, 2026 – Tenable reports the vulnerability, AWS acknowledges
April 19, 2026 – Tenable requests an update
April 20, 2026 – AWS shares that the observed behavior is functioning as intended and is compliant with the OAuth 2.0 specification
May 4, 2026 – Tenable requests an update (the update from April 20 was missed), AWS reshares the update from April 20, Tenable acknowledges
All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.
Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers.
Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.
For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.
If you have questions or corrections about this advisory, please email
[email protected]