Skip to main content

Authlib CVE-2025-61920

HIGH
Improper Input Validation (CWE-20)
2025-10-10 security-advisories@github.com
7.5
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Identify Authlib JWS/JWT verification endpoint
  2. Delivery
    Craft token with oversized header/signature segment
  3. Exploit
    Submit token to unauthenticated endpoint
  4. Execution
    Authlib decodes and parses full buffer
  5. Impact
    CPU and memory exhausted, service denied

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

No special configuration is required beyond the target application using Authlib (≤ 1.6.3, and up to < 1.6.5) to verify attacker-supplied JWS/JWT tokens - i.e. any OAuth/OIDC flow, token introspection, or JWT authentication path that calls Authlib's JOSE deserialize_compact / extract_segment routines on untrusted input. Exploitation is remote and unauthenticated (CVSS PR:N, confirmed by vector), needs no user interaction, and succeeds against default configurations because pre-1.6.5 code imposed no size bound. The primary LIMITING factor is deployment of a size guard outside Authlib: if a proxy/WAF or application layer already rejects oversized token inputs (a few KB) before they reach Authlib, or rate-limits the verification endpoint, the amplification is neutralized. Impact is availability-only; no authentication bypass or data disclosure results.

Impact

This is a genuine but bounded availability-only risk. All signals align coherently: the CVSS v3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, 7.5) describes a remote, low-complexity, unauthenticated attack with no user interaction that impacts only availability (C:N/I:N - no data exposure or integrity loss). The GitHub-issued advisory and commit confirm the root cause (unbounded JOSE header/signature segments, CWE-20) and a vendor fix in 1.6.5, and publicly available exploit code (the GHSA PoC jws_segment_dos_demo.py) lowers the barrier to opportunistic abuse. No EPSS score and no SSVC decision data were provided in the input, and the CVE is NOT listed in CISA KEV, so there is no evidence of active real-world exploitation - the threat is a publicly demonstrated DoS, not confirmed in-the-wild attacks. The practical priority is moderate: exploitation is easy and unauthenticated against any endpoint that verifies attacker-supplied JWS/JWT, but impact is confined to resource exhaustion (the advisory measured ~4 GB RSS and ~9 s CPU for a 500 MB header), and several effective mitigations exist (upstream patch, proxy/WAF input-size limits, rate limiting). Prioritize patching on internet-facing OAuth/OIDC token-verification services; de-prioritize where tokens are already size-capped upstream.

Exploit ScenarioDerived

An unauthenticated remote attacker sends a single crafted JWS/JWT to any Authlib-backed OAuth/OIDC verification endpoint, with the base64url header or signature segment inflated to hundreds of megabytes. Authlib fully base64-decodes and parses the oversized buffer before rejecting it, spiking CPU and RAM (~4 GB RSS, ~9 s CPU for a 500 MB header per the advisory) and exhausting service capacity. Publicly available PoC exploit code (jws_segment_dos_demo.py) exists, making the attack trivially reproducible.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Oct 19, 2026

Authlib's JOSE/JWS verification path (through 1.6.4, with 1.6.5 as the fix) decodes attacker-supplied JWT/JWS header and signature segments without any size bound, so a single malicious token with a hundreds-of-megabytes base64url segment can exhaust CPU and memory and knock an OAuth/OIDC or JWT-authenticating service offline. Any application that hands untrusted tokens to Authlib's deserialize_compact / extract_segment routines is exposed, with no authentication or user interaction needed. Publicly available exploit code exists (the advisory ships a working PoC that consumed ~4 GB RSS and ~9 s CPU on a 500 MB header), and the risk is real but bounded: it is availability-only, and it disappears if a proxy, WAF, or application layer rejects oversized tokens before Authlib sees them.

RemediationAI

Vendor-released patch: upgrade Authlib to 1.6.5 or later (pip install --upgrade 'authlib>=1.6.5'), which applies the upstream commit 867e3f87b072347a1ae9cf6983cc8bbf88447e5e adding a 256 KB MAX_CONTENT_LENGTH and per-segment header/signature length checks that raise ValueError before any decoding occurs; Debian LTS users should apply the fixed package from https://lists.debian.org/debian-lts-announce/2025/10/msg00032.html, and details are in advisory GHSA-pq5p-34cr-23v9. If immediate upgrade is not possible, the effective compensating control is a hard input-size limit enforced outside Authlib: configure the reverse proxy or WAF to reject request bodies, Authorization headers, or token form parameters larger than a few kilobytes (real-world JWTs are typically 1-4 KB, so a 16 KB cap is safe) - the trade-off is that you must audit legitimate token sizes first and remember this guard must be applied to every path that receives tokens (introspection endpoints, callback URLs, websocket auth); alternatively wrap token verification in application code that checks len(token) before calling deserialize_compact, and add per-client rate limiting or throttling on verification endpoints to cap the amplification an attacker can achieve, accepting that throttling only reduces rather than eliminates the DoS potential.

Affected Packages

pypi authlib fix: 1.6.5

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 widely used Python library for building OAuth 2.x and OpenID Connect clients, servers, and resource servers. Its authlib/jose module implements the JOSE standards: RFC 7515 (JSON Web Signature) and RFC 7519 (JWT), where compact serialization takes the form base64url(header).base64url(payload).base64url(signature). The root cause is CWE-20, improper input validation: before version 1.6.5, JsonWebSignature.deserialize_compact and the helper functions in authlib/jose/util.py (extract_segment/extract_header) passed the raw dotted string straight into base64url decoding and JSON parsing without checking segment length. Because base64 decoding and JSON parsing are linear in input size and Python allocates the decoded buffer plus parsed structures, a token with a 500 MB header forces both an enormous allocation and seconds of CPU work before signature verification can even fail. The upstream fix (commit 867e3f87) introduces a MAX_CONTENT_LENGTH of 256000 bytes plus explicit 256 KB checks on each header/signature segment, raising ValueError('Serialization is too long') early, and adds regression tests covering oversized header, payload, and signature segments. Note that the vulnerable JOSE code is used not only by direct library consumers but is also reachable through higher-level OAuth/OIDC and JWT-validation calls, so the attack surface is any endpoint that processes a token string.

Know when Authlib 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 (github) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Remote unauthenticated token submission with no UI (AV:N/AC:L/PR:N/UI:N); only resource exhaustion occurs, so C:N/I:N/A:H and scope unchanged.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

DescriptionCVE.org

Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.

Blast Radius

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

Ecosystem-wide dependent count for version 1.6.5.

Executive ViewAI

Why It Matters

A high-severity availability flaw in Authlib, the Python library used by many of our OAuth/OIDC and JWT-validating services, allows a single specially crafted token to consume gigabytes of memory and seconds of CPU, potentially taking a token-verifying service offline. Any internet-facing login, API gateway, or identity component that accepts untrusted tokens and passes them to Authlib is in scope, meaning customer-facing authentication and single sign-on availability could be disrupted without any credentials or user interaction. Public exploit code exists, so the barrier to attempting this denial-of-service is low, though the impact is limited to service availability rather than data exposure or compromise.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 50% exploitable
Prevalence
Medium
popular Python OAuth/OIDC library, common in services but not ubiquitous
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

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 HIGH
CISA KEV No
Public POC Yes
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Medium

Priority Score

59
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

cpe:2.3:a:authlib:authlib:*:*:*:*:*:*:*:*
CVE-2025-68158 HIGH POC
8.8 Jan 08

Authlib is a Python library which builds OAuth and OpenID Connect servers. [CVSS 5.7 MEDIUM]

CVE-2026-28802 HIGH POC
7.7 Mar 06

Authentication bypass in Authlib (Python OAuth/OpenID Connect library) versions 1.6.5 through 1.6.6 allows remote attack

CVE-2025-59420 HIGH POC
7.5 Sep 22

Authlib is a Python library which builds OAuth and OpenID Connect servers. Rated high severity (CVSS 7.5), this vulnerab

CVE-2024-37568 HIGH POC
7.5 Jun 09

lepture Authlib before 1.3.1 has algorithm confusion with asymmetric public keys. Rated high severity (CVSS 7.5), this v

CVE-2025-62706 MEDIUM POC
6.5 Oct 22

Unbounded DEFLATE decompression in Authlib's JWE zip=DEF handling (authlib/jose/rfc7518/jwe_zips.py) lets a small, valid

CVE-2026-96760 CRITICAL
9.8 Sep 28

Signature verification bypass in Authlib 1.7.2 and earlier allows unauthenticated remote attackers to have crafted JWS J

CVE-2026-104056 CRITICAL
9.8 Oct 01

Poisoned OAuth/OIDC discovery metadata in Authlib 1.7.2 and earlier allows an attacker who controls or intercepts the me

CVE-2026-102946 CRITICAL
9.1 Oct 15

Authentication bypass in the joserfc Python library before 1.7.4 lets remote, unauthenticated attackers submit a JWS Gen

CVE-2026-114616 HIGH
7.4 Oct 22

Token forgery in the Authlib Python library before 1.9.1 lets a remote, unauthenticated attacker mint HS256, HS384 or HS

CVE-2026-114615 HIGH
7.4 Oct 22

Authentication bypass in Authlib's deprecated-but-still-shipped authlib.jose module (1.3.1 through 1.8.0, fixed in 1.9.0

CVE-2026-114618 MEDIUM
6.8 Oct 22

Authlib's default RFC 7523 JWT bearer grant, in all releases prior to 1.9.0, fails to bind an incoming JWT assertion to

CVE-2026-114620 MEDIUM
5.4 Oct 22

Server-side request forgery in Authlib's RFC 9101 JWTAuthenticationRequest (JAR) extension lets unauthenticated remote a

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