CVE-2026-114620: Authlib: Unvalidated request_uri fetch in JWT-secured authorization request (JAR) leading to SSRF
Authlib's RFC 9101 (JAR) extension hands the request_uri parameter of an authorization request to the integrator's get_request_object() hook without any validation, before authentication. Servers that follow the documented requests.get(request_uri) pattern can be made to fetch internal URLs. Authlib 1.6.0 up to 1.9.0 is affected. Upgrade to 1.9.0.
Published Oct 27, 2026 · Analysis Nov 1, 2026
What an attacker can do
In authlib/oauth2/rfc9101/authorization_server.py, the extension hooks into before_get_authorization_grant, so it runs on every authorization request. support_request_uri defaults to True. The only check is that client_id names an existing client, and client IDs are public. _get_raw_request_object() then passes request_uri to get_request_object(). Authlib leaves that method abstract, but its class docstring and the hook's docstring both show an implementation that calls requests.get(request_uri) directly.
Authlib already has a pre-registration allowlist, the request_uris client metadata and require_request_uri_registration server metadata, but the rfc9101 package never reads either. RFC 9101 section 10.4.1 asks for location checks, a media-type check, a timeout and no recursive fetches. None are present.
An unauthenticated attacker sends GET /authorize with request_uri pointing at an internal address such as the cloud metadata service at 169.254.169.254. The server fetches it. The response is never shown, so this is blind SSRF. But invalid_request_uri versus invalid_request_object errors, plus timing, reveal which internal hosts and ports respond. Deployments that already restrict the URL inside their override are not affected.
Who is affected
authlib (pip) from 1.6.0 up to, but not including, 1.9.0, where your authorization server uses the RFC 9101 JWTAuthenticationRequest extension and implements get_request_object() by fetching the URL. The report verified 1.7.2. Check the version:
pip show authlibThen search your code for subclasses of JWTAuthenticationRequest and for requests.get(request_uri).
authlib
- Ecosystem
- PyPI
- Affected
- >= 1.6.0, < 1.9.0
- Fixed in
- 1.9.0
- Check
pip show authlib
How to fix it
Upgrade to authlib 1.9.0:
pip install --upgrade "authlib>=1.9.0"Pull request 949 validates request_uri before retrieval and rejects all URIs by default unless the application sets an explicit policy. It adds authlib.oidc.core.JWTAuthenticationRequest, which checks URI registration first. The PR also documents retrieval safeguards: destination restrictions, DNS rebinding, redirects, response size and deadlines. Because of that default, test any flow that relies on request_uri. As a stopgap, check the URL against an allowlist inside your own get_request_object() or return None.
How to tell if you were hit
Search authorization server logs for GET /authorize requests with a request_uri value that points at private ranges, loopback or metadata addresses, or at hosts that are not registered for the client. Check egress logs from the authorization server for connections to internal addresses at the same times. A run of invalid_request_uri and invalid_request_object errors from one source suggests port scanning.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Authlib's RFC 9101 (JAR) extension passes the attacker-controlled request_uri authorization parameter straight to the get_request_object() fetch hook with no validation, at a pre-authentication endpoint. Authlib already defines the pre-registration allowlist for this (request_uris client metadata and require_request_uri_registration server metadata) but the extension never consults it, and both docstrings instruct integrators to implement the hook as an unrestricted requests.get(request_uri). Deployments following the documented pattern get an unauthenticated SSRF primitive.
Details
Verified against authlib 1.7.2 and current main. All line numbers below are from authlib/oauth2/rfc9101/authorization_server.py.
The extension registers itself on the before_get_authorization_grant hook (lines 62-65), so it runs on every authorization request before any user or client authentication. support_request_uri defaults to True (line 58).
The only gate before the sink is that client_id names an existing client (lines 91-103). A client_id is a public, non-secret identifier.
The sink at line 159 forwards the raw parameter with no scheme, host, or allowlist check:
def _get_raw_request_object(self, request: OAuth2Request) -> str:
if "request_uri" in request.payload.data:
raw_request_object = self.get_request_object(
request.payload.data["request_uri"]
)
if not raw_request_object:
raise InvalidRequestUriError(state=request.payload.state)get_request_object is abstract (line 213, raise NotImplementedError() at line 225), so authlib itself performs no outbound request. The defect is that authlib supplies unvalidated attacker input to that extension point and then documents the insecure implementation twice — in the class docstring (lines 34-38) and in the hook's own docstring (lines 218-223):
def get_request_object(self, request_uri: str):
try:
return requests.get(request_uri).text
except requests.Exception:
return NoneTwo points sharpen this beyond a generic documentation issue:
- The allowlist already exists and is ignored. Authlib validates
request_urisas client metadata (authlib/oauth2/rfc7591/claims.py:319) andrequire_request_uri_registrationas server metadata (authlib/oauth2/rfc8414/models.py:263). Therfc9101package contains zero references to either name, so the pre-registration model is never enforced at the point of use. - RFC 9101 §10.4.1 asks for controls that are absent. It states the server should "a) check that the value of the
request_uriparameter does not point to an unexpected location, b) check that the media type of the response isapplication/oauth-authz-req+jwt, c) implement a timeout for obtaining the content ofrequest_uri, and d) not perform recursive GET on therequest_uri." The extension implements none of these and the documented example implements none of them either.
The two failure paths are distinguishable, which supplies the inference channel for a blind SSRF: a falsy fetch result raises InvalidRequestUriError (invalid_request_uri, lines 162-163), while a successful fetch of non-JWT content raises InvalidRequestObjectError (invalid_request_object, line 186).
PoC
This demonstrates the library-level defect with no network egress required: it shows the unvalidated URI reaching the fetch hook pre-authentication.
python -m venv .venv && .venv/bin/pip install authlibfrom authlib.oauth2.rfc6749.requests import BasicOAuth2Payload, OAuth2Request
from authlib.oauth2.rfc9101 import JWTAuthenticationRequest
reached = []
class Extension(JWTAuthenticationRequest):
def get_request_object(self, request_uri):
reached.append(request_uri) # the docstring puts requests.get(request_uri) here
return None
def resolve_client_public_key(self, client):
return {"keys": []}
def get_server_metadata(self):
return {}
def get_client_require_signed_request_object(self, client):
return False
class AuthorizationServer:
def query_client(self, client_id):
return object()
uri = "http://169.254.169.254/latest/meta-data/"
request = OAuth2Request("GET", "https://as.example/authorize")
request.payload = BasicOAuth2Payload({"client_id": "demo", "request_uri": uri})
try:
Extension().parse_authorization_request(AuthorizationServer(), request)
except Exception as exc:
print("error:", type(exc).__name__)
print("fetch hook received:", reached)Output on authlib 1.7.2:
error: InvalidRequestUriError
fetch hook received: ['http://169.254.169.254/latest/meta-data/']Against a deployment that used the docstring implementation, the equivalent unauthenticated request is:
GET /authorize?response_type=code&client_id=demo&request_uri=http%3A%2F%2F169.254.169.254%2Flatest%2Fmeta-data%2FReturning a fetched-but-non-JWT body instead of None in the snippet above yields InvalidRequestObjectError rather than InvalidRequestUriError, showing the oracle that distinguishes a reachable target from an unreachable one.
Impact
Server-side request forgery, reachable without authentication by anyone who knows a valid client_id. In a deployment that implemented get_request_object as documented, an attacker can make the authorization server issue GET requests to arbitrary URLs: internal-only services, cloud metadata endpoints such as 169.254.169.254, and side-effectful internal GET routes. The invalid_request_uri versus invalid_request_object split, together with response timing, provides an oracle for internal host and port discovery. RFC 9101 §10.4.1 additionally notes the DoS and recursive-lookup risks that the missing timeout and recursion checks leave open.
Response bodies are consumed as a JWT and never reflected, so this is a blind primitive rather than direct data exfiltration. Because the fetch executes in integrator code, deployments that already allowlist inside their override are unaffected — but authlib provides no hook to make that the default, ships support_request_uri=True, and its documentation steers integrators to the unsafe implementation, so the insecure outcome is the expected one.
Credited to priyankn.
Questions
- Does CVE-2026-114620 need authentication?
No. The attacker only needs a valid client_id, which is a public identifier, and the server must implement get_request_object() by fetching the URL.
- Can the attacker read the fetched response?
No. The body is treated as a JWT and never reflected. It is a blind SSRF, though the two error types and timing show whether internal targets respond.
- Which version fixes it?
authlib 1.9.0, via pull request 949. The vulnerable range starts at 1.6.0.
References
Read for this analysis:
- https://github.com/authlib/authlib/security/advisories/GHSA-x4rv-c3wx-4cr8
- https://github.com/authlib/authlib/pull/949
- https://nvd.nist.gov/vuln/detail/CVE-2026-114620
- https://github.com/authlib/authlib/commit/6563f6f7a8c2f71d2f85ee7511d72a4fbae3acc0
- https://github.com/authlib/authlib/commit/891e3f10ae5989176211f8be35dcc7cd40aa92c6
- https://github.com/authlib/authlib/releases/tag/v1.9.0
- https://github.com/advisories/GHSA-x4rv-c3wx-4cr8
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-114614
Authlib: is_secure_transport() loopback exemption can be bypassed with a userinfo component, allowing cleartext-HTTP URLs to non-loopback hosts
low2.6Oct 27, 2026CVE-2026-114615
Authlib incomplete algorithm-confusion fix permits HMAC forgery with prefixed public keys
high7.4Oct 27, 2026CVE-2026-114617
Authlib: ID token can disable its own nonce validation via the nonce_supported claim
medium4.2Oct 27, 2026CVE-2026-114618
Authlib: Default JWT bearer grant accepts assertions for the wrong audience
medium6.8Oct 27, 2026CVE-2026-114619
Authlib: OpenID implicit grant checks raw scope instead of allowed scope before issuing ID tokens
medium4.6Oct 27, 2026CVE-2026-96760
Authlib: empty signatures validation in JWS JSON deserialization
critical9.1Oct 27, 2026
