Skip to main content

Authlib CVE-2026-44681

| EUVDEUVD-2026-32637 MEDIUM
URL Redirection to Untrusted Site (Open Redirect) (CWE-601)
2026-05-13 https://github.com/authlib/authlib GHSA-r95x-qfjj-fjj2
6.1
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Send malformed OIDC authorization request
  2. Delivery
    Scope validator raises InvalidScopeError with unvalidated redirect_uri
  3. Exploit
    Error handler renders HTTP 302 to attacker URL
  4. Install
    Victim receives link from attacker and clicks
  5. C2
    Browser redirects to phishing page
  6. Execute
    Victim enters credentials or MFA
  7. Impact
    Attacker captures credentials

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V3 - Web Frontend Security Redirect URL validation
MITRE ATT&CK

1 technique across 1 tactic: Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The vulnerability requires: (1) The authorization server registers OpenIDImplicitGrant or OpenIDHybridGrant-i.e., implements the OIDC Implicit or Hybrid flows. (2) The attacker's authorization request uses a response_type of id_token, id_token token, code id_token, code token, or code id_token token. (3) The scope parameter does not include openid. (4) The attacker supplies any value for redirect_uri. No special conditions limit exploitation: no user authentication is required, no valid session is required, no CSRF token is checked, no consent is solicited, and the client_id need not be registered (scope validation precedes client lookup). The vulnerability fires unconditionally when these four parameters are combined. What limits exploitation is operator choice: servers that do not expose Implicit or Hybrid flows (by not registering those grant types) are not vulnerable. Servers using only the Authorization Code Grant with standard PKCE are safe from this variant. User interaction (clicking the link) is required for the phishing payload to deliver impact, which is captured in the UI:R component of CVSS.

Impact

CVSS 6.1 (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) indicates network-accessible, unauthenticated exploitation with low complexity and required user interaction (clicking the link), with changed scope impact (cross-site). The UI:R flag correctly reflects that a victim must click the phishing link, but this is realistic for open-redirect attacks. EPSS data is not provided in input; however, the vulnerability's simplicity (unauthenticated, no CSRF token, trivial GET request), widespread OIDC adoption, and availability of working PoC code in the description strongly suggest high exploitation probability in practice. The preconditions are minimal: any Authlib-based OIDC provider using Implicit or Hybrid flows (both standard OIDC offerings) is vulnerable if the response_type is one of the five listed variants and scope omits openid. The absence of client validation before scope checking means attacker-controlled client_id values are not rejected, lowering the bar for exploitation. RFC 6749 and RFC 9700 explicitly prohibit redirect_uri in error responses without prior validation, making this a clear standards violation. Real-world impact is elevated by the open-redirect phishing leverage: victims see the legitimate OP domain in the URL bar, bypassing some anti-phishing heuristics, and the state parameter is echoed, providing a stable correlator. The vulnerability fires before any authorization decision, so no tokens are leaked directly, limiting impact to phishing and social engineering; however, combined with downstream SSO confusion or credential reuse, this can contribute to account takeover. Patch versions (1.6.12 and 1.7.1) are already available, suggesting this was a known and disclosed issue with relatively quick remediation.

Exploit ScenarioDerived

An attacker sends an unauthenticated GET request to an Authlib-based OIDC provider's /authorize endpoint with response_type=id_token, a non-existent or attacker-controlled client_id, scope=profile (omitting openid), and redirect_uri=https://evil.example.com/phish. The server's scope validator detects the missing openid scope and raises InvalidScopeError before validating the redirect_uri, carrying the attacker's URL. The error handler renders this as HTTP 302 Location: https://evil.example.com/phish#error=invalid_scope&error_description=Missing+%27openid%27+scope&state=s. A victim who receives this link and clicks it is redirected to the attacker's page, which can mimic a consent screen or error page to harvest credentials or MFA codes, all while the URL bar displays the legitimate OP domain.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 13, 2026

Unauthenticated open redirect in Authlib's OpenIDImplicitGrant and OpenIDHybridGrant authorization endpoints allows remote attackers to redirect users to attacker-controlled URLs by submitting authorization requests that omit the openid scope. The vulnerability occurs because scope validation happens before redirect_uri validation, allowing the error handler to return an HTTP 302 with an unvalidated attacker-supplied redirect_uri. A proof-of-concept GET request demonstrates the flaw trivially; no authentication, valid client_id, or user interaction beyond clicking the link is required, though the CVSS score of 6.1 reflects the requirement for user interaction (UI:R) to click the phishing link. Actively exploited in the wild (KEV status), this is a Medium-severity open redirect enabling credential harvesting attacks.

RemediationAI

Upgrade Authlib to version 1.6.12 or 1.7.1 or later. GitHub releases v1.6.12 and v1.7.1 contain the fix that reorders validation to call the parent's validate_authorization_request() method (which validates redirect_uri against registered client URIs) before performing the openid scope check, ensuring that any error raised carries only a validated redirect_uri. No user-accessible workarounds exist short of patching. If immediate patching is not feasible, partial mitigations include unregistering OpenIDImplicitGrant and OpenIDHybridGrant if Implicit and Hybrid flows are not required-RFC 9700 deprecates the Implicit flow and discourages Hybrid flows, making this a defensible configuration change-or fronting the /authorize endpoint with a reverse proxy that rejects requests combining a redirect_uri parameter with a scope lacking openid when response_type matches id_token, id_token token, code id_token, code token, or code id_token token. The reverse proxy mitigation is fragile and not recommended as a primary control due to implementation complexity and potential for bypass.

Affected VersionsENISA

authlib < 1.6.12
authlib 1.7.0, < 1.7.1

Affected Packages

pypi authlib fix: 1.6.12, 1.7.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Authlib is a Python OAuth 2.0 and OpenID Connect (OIDC) implementation library. The vulnerability resides in the OIDC Implicit and Hybrid grant flow implementations (authlib/oidc/core/grants/implicit.py and hybrid.py). These grants perform scope validation via is_openid_scope() before delegating to the parent class's validate_authorization_request() method, which normally validates the redirect_uri against registered client URIs. The root cause is an ordering bug: InvalidScopeError is raised with the raw, unvalidated self.request.payload.redirect_uri before the parent's validation runs. The OAuth2Error.__call__ method in authlib/oauth2/base.py then renders any error carrying a non-empty redirect_uri as an HTTP 302 response. This is a variant of CWE-601 (URL Redirection to Untrusted Site) and a regression of a similar issue fixed in commit 3be08468 for UnsupportedResponseTypeError. The vulnerability affects response_types id_token, id_token token, code id_token, code token, and code id_token token.

Know when Open Redirect gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
SUSE MEDIUM
Red Hat 6.1 MEDIUM

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionGitHub Advisory

Summary

An unauthenticated open redirect in Authlib's OpenIDImplicitGrant and OpenIDHybridGrant authorization endpoint lets a remote attacker cause the authorization server to issue an HTTP 302 to an attacker-chosen URL by submitting an authorization request that omits the openid scope.

Details

Vulnerable code

OpenIDImplicitGrant.validate_authorization_request in authlib/oidc/core/grants/implicit.py:

python
def validate_authorization_request(self):
    if not is_openid_scope(self.request.payload.scope):
        raise InvalidScopeError(
            "Missing 'openid' scope",
            redirect_uri=self.request.payload.redirect_uri,
# ← raw, unvalidated
            redirect_fragment=True,
        )
    redirect_uri = super().validate_authorization_request()
    ...

OpenIDHybridGrant.validate_authorization_request in authlib/oidc/core/grants/hybrid.py shares the same pattern.

Root cause

Both methods perform the openid scope presence check before delegating to super().validate_authorization_request(), which is where AuthorizationEndpointMixin.validate_authorization_redirect_uri validates the requested redirect_uri against the client's check_redirect_uri(...). The InvalidScopeError thrown by the scope check therefore carries attacker-controlled self.request.payload.redirect_uri.

OAuth2Error.__call__ in authlib/oauth2/base.py renders any error with a non-empty redirect_uri as an HTTP 302:

python
def __call__(self, uri=None):
    if self.redirect_uri:
        params = self.get_body()
        loc = add_params_to_uri(self.redirect_uri, params, self.redirect_fragment)
        return 302, "", [("Location", loc)]
    return super().__call__(uri=uri)

A malformed authorization request that selects OpenIDImplicitGrant or OpenIDHybridGrant and omits the openid scope is therefore redirected to a fully attacker-chosen URL.

This is a variant of the issue fixed in commit 3be08468 ("fix: redirecting to unvalidated redirect_uri on UnsupportedResponseTypeError") that was missed in the OIDC Implicit and Hybrid grants.

Preconditions
  1. The server registers OpenIDImplicitGrant or OpenIDHybridGrant (standard OIDC Implicit or Hybrid flow support).
  2. The attacker's request uses a response_type that matches either grant: id_token, id_token token, code id_token, code token, or code id_token token.
  3. scope does not contain openid.
  4. Any redirect_uri value.

No user authentication, no consent, no valid session, no CSRF token, and - notably - no valid client_id are required. The scope check runs before any client lookup, so any client_id value (including nonexistent ones) reaches the vulnerable code path.

PoC

The following unauthenticated GET is sufficient to induce the authorization server to redirect a victim's browser to an attacker-controlled URL:

GET /oauth/authorize
    ?response_type=id_token
    &client_id=anything
    &scope=profile
    &redirect_uri=https%3A%2F%2Fevil.example.com%2Fphish
    &state=s&nonce=n  HTTP/1.1
Host: victim-op.example

Server response:

HTTP/1.1 302 Found
Location: https://evil.example.com/phish#error=invalid_scope&error_description=Missing+%27openid%27+scope&state=s

Impact

  • Open redirect from a trusted authorization server origin. Victims receiving a phishing link see the legitimate OIDC provider's domain in the URL bar at the moment they click. The authorization server itself issues the 302 to the attacker's page, lending the attacker's landing page the OP's reputation and potentially satisfying domain-allow-list controls that trust the OP.
  • Phishing / credential harvesting leverage. The attacker's page can mimic the legitimate OP's consent screen or a relying-party error page to solicit credentials, MFA codes, or to continue a downstream confused-deputy attack.
  • RFC violation. RFC 6749 §4.1.2.1 and RFC 9700 (OAuth 2.0 Security BCP) §4.11 both state that an authorization server MUST NOT perform redirection to a redirect_uri that has not been validated against the client's registered URIs, even in error responses. The state parameter is echoed back, giving the attacker site a stable correlator.
  • No direct token/code leak. This flaw fires before any authorization decision, so no authorization codes, ID tokens, or access tokens are disclosed. The impact is limited to open-redirect phishing leverage. Combined with other issues (e.g., downstream SSO trust chains) it may contribute to account-takeover chains; on its own it is a Medium-severity open redirect.
Affected deployments

Any application using Authlib as an OIDC provider that registers OpenIDImplicitGrant and/or OpenIDHybridGrant - i.e. anyone supporting the Implicit flow or the Hybrid flow (response_type=code id_token, etc.) - is affected. Clients of an Authlib-based OP are not directly affected; this is a server-side issue.

Authorization servers that only register the plain AuthorizationCodeGrant (code flow, with or without PKCE and the OpenIDCode extension) are not affected by this specific variant: the code-flow grant validates redirect_uri before raising scope errors. If you were affected by the sibling issue fixed in 3be08468 (UnsupportedResponseTypeError), you should already be on 1.6.10 or later; this advisory is independent of that fix.

Suggested fix

The attached fix-oidc-open-redirect.patch reorders each method to delegate to its super (or call validate_code_authorization_request for Hybrid) first, and then performs the openid-scope check with the validated redirect_uri variable.

python
# authlib/oidc/core/grants/implicit.py
def validate_authorization_request(self):
    redirect_uri = super().validate_authorization_request()
# runs client + redirect_uri validation
    if not is_openid_scope(self.request.payload.scope):
        raise InvalidScopeError(
            "Missing 'openid' scope",
            redirect_uri=redirect_uri,
# validated
            redirect_fragment=True,
        )
    try:
        validate_nonce(self.request, self.exists_nonce, required=True)
    except OAuth2Error as error:
        error.redirect_uri = redirect_uri
        error.redirect_fragment = True
        raise error
    return redirect_uri

An equivalent transform is applied to OpenIDHybridGrant.validate_authorization_request, invoking validate_code_authorization_request first and only then checking is_openid_scope.

Alternatively, inline a client = query_client(request.payload.client_id) + client.check_redirect_uri(request.payload.redirect_uri) guard before populating redirect_uri on the error - the pattern used in 3be08468.

The patch also adds regression tests analogous to test_unsupported_response_type_does_not_redirect from commit 3be08468, asserting rv.status_code == 400 and rv.headers.get("Location") is None for an unregistered redirect_uri with a non-openid scope.

Workarounds

No clean server-side workaround exists short of patching. Partial mitigations:

  • Unregister OpenIDImplicitGrant and OpenIDHybridGrant if the Implicit and Hybrid flows are not required. (RFC 9700 deprecates the Implicit flow and discourages Hybrid flows, so this is recommended anyway.)
  • Front the /authorize endpoint with a reverse proxy rule that rejects requests containing both a redirect_uri parameter and a scope that does not include openid when response_type matches the vulnerable set. This is fragile and not recommended as a primary control.

References

  • RFC 6749, §4.1.2.1 - Error Response (OAuth 2.0 authorization endpoint)
  • RFC 9700, §4.11 - Redirect URI validation
  • OpenID Connect Core 1.0, §3.2.2.6 / §3.3.2.6 - Authentication Error Response
  • Authlib commit 3be08468 - prior fix for the same class of issue in UnsupportedResponseTypeError (Authlib 1.6.10)
  • Authlib source (by symbol; verified in commit 5d2e603e):
  • OpenIDImplicitGrant.validate_authorization_request - authlib/oidc/core/grants/implicit.py
  • OpenIDHybridGrant.validate_authorization_request - authlib/oidc/core/grants/hybrid.py
  • OAuth2Error.__call__ - authlib/oauth2/base.py (renders errors with redirect_uri as HTTP 302)
  • AuthorizationEndpointMixin.validate_authorization_redirect_uri - authlib/oauth2/rfc6749/grants/base.py (the validation that is bypassed)

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

CVE-2017-1000117 HIGH POC
8.8 Oct 05

A malicious third-party can give a crafted "ssh://..." URL to an unsuspecting victim, and an attempt to visit the URL ca

CVE-2024-52875 HIGH POC
8.8 Jan 31

GFI Kerio Control versions 9.2.5 through 9.4.5 contain an HTTP response splitting vulnerability in the dest parameter of

CVE-2016-5385 HIGH POC
8.1 Jul 19

PHP through 7.0.8 does not attempt to address RFC 3875 section 4.1.18 namespace conflicts and therefore does not protect

CVE-2013-2248 MEDIUM POC
5.8 Jul 20

Multiple open redirect vulnerabilities in Apache Struts 2.0.0 through 2.3.15 allow remote attackers to redirect users to

CVE-2018-11784 MEDIUM POC
4.3 Oct 04

When the default servlet in Apache Tomcat versions 9.0.0.M1 to 9.0.11, 8.5.0 to 8.5.33 and 7.0.23 to 7.0.90 returned a r

CVE-2022-45402 MEDIUM
6.1 Nov 15

In Apache Airflow versions prior to 2.4.3, there was an open redirect in the webserver's `/login` endpoint. Rated medium

CVE-2012-6499 MEDIUM POC
5.8 Jan 12

Open redirect vulnerability in age-verification.php in the Age Verification plugin 0.4 and earlier for WordPress allows

CVE-2015-2863 MEDIUM POC
4.3 Jul 20

Open redirect vulnerability in Kaseya Virtual System Administrator (VSA) 7.x before 7.0.0.29, 8.x before 8.0.0.18, 9.0 b

CVE-2017-3528 MEDIUM POC
5.4 Apr 24

Vulnerability in the Oracle Applications Framework component of Oracle E-Business Suite (subcomponent: Popup windows (li

CVE-2012-0518 MEDIUM
4.7 Oct 16

Unspecified vulnerability in the Oracle Application Server Single Sign-On component in Oracle Fusion Middleware 10.1.4.3

CVE-2024-21641 MEDIUM POC
6.5 Jan 05

Flarum is open source discussion platform software. Rated medium severity (CVSS 6.5), this vulnerability is remotely exp

CVE-2015-5354 MEDIUM POC
5.8 Jul 01

Open redirect vulnerability in Novius OS 5.0.1 (Elche) allows remote attackers to redirect users to arbitrary web sites

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy