Authlib
CVE-2025-62706
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain ability to submit decryptable JWE
-
DeliveryCraft tiny zip=DEF compression-bomb token
-
ExploitSend token to JWE decode endpoint
-
ExecutionUnbounded DEFLATE inflates to hundreds of MB
-
PersistRepeat to exhaust memory and CPU
-
ImpactDenial of service / host starvation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the application uses Authlib's JOSE JWE decode path and accepts/decrypts JWE tokens whose protected header specifies 'zip':'DEF' (DEFLATE compression), on versions prior to 1.6.5. The attacker must be able to supply a token the target will actually decrypt - i.e. possess or control the relevant decryption key material or operate within a trust relationship that accepts externally-supplied JWEs (reflected by PR:L). Limiting factors: services that never enable/accept zip=DEF, that strip or reject compressed JWEs at the boundary, that enforce strict maximum token sizes and rate limiting, or that already run 1.6.5+ are not exploitable. No end-user interaction is required (UI:N). Impact is availability-only (memory/CPU exhaustion); no data disclosure or modification occurs. |
| Impact | This is a genuine but moderate-priority availability issue rather than a critical emergency. The CVSS vector (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H, base 6.5) correctly captures a network-reachable, low-complexity attack with no confidentiality or integrity impact and high availability impact - a classic CWE-400 resource-exhaustion (decompression bomb) profile. Multiple signals align and should temper urgency: EPSS is only 0.46% (38th percentile), there is NO CISA KEV listing (no evidence of active exploitation), and the only impact is denial of service. These point to low real-world mass-exploitation likelihood. Countervailing the low EPSS, publicly available exploit/PoC code exists (the vendor GHSA ships a working jwe_deflate_dos_demo.py), which lowers the skill barrier and makes opportunistic DoS against exposed Authlib JOSE endpoints plausible. One important nuance that limits risk: the PR:L in the vector and the description ('an attacker who can supply decryptable tokens') mean the attacker must be able to produce JWEs the target will actually decrypt - i.e. possess or control the relevant key material or a trust relationship - so this is not a trivially anonymous internet-wide attack. SSVC-style reading: exploitation=PoC, automatable=likely yes (repeatable crafted tokens), technical impact=partial (availability only). Net: patch in due course, prioritize internet-facing services that accept third-party or externally-issued JWE tokens with zip=DEF, but this does not rise to drop-everything severity. |
| Exploit ScenarioDerived | An attacker who can submit a JWE the service will decrypt crafts a tiny zip=DEF (DEFLATE) ciphertext containing highly repetitive data that inflates to tens or hundreds of megabytes on decompression. When Authlib's JWE decode path decompresses it without a size bound, the target process spikes RSS and CPU; repeating the request across connections starves the host and causes denial of service. Public PoC code (jwe_deflate_dos_demo.py in the vendor advisory GHSA-g7f3-828f-7h7m) demonstrates the amplification, lowering the barrier to reproduce. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Unbounded DEFLATE decompression in Authlib's JWE zip=DEF handling (authlib/jose/rfc7518/jwe_zips.py) lets a small, valid ciphertext expand into hundreds of megabytes during decrypt, exhausting memory and CPU on services running versions prior to 1.6.5. Attackers must be able to supply a JWE the application will actually decrypt - typically through possession of key material or an endpoint accepting externally-supplied encrypted tokens - and the impact is availability-only with no disclosure or modification (CVSS 6.5, PR:L, A:H). A public proof-of-concept and a hardened comparison implementation exist, but exploitation requires the application to accept zip=DEF tokens; no confirmed active exploitation is reported, and EPSS is low at 0.46% (38th percentile).
RemediationAI
Upgrade to Authlib 1.6.5, which bounds decompression at 250 KB and raises ValueError on oversized output; see advisory https://github.com/authlib/authlib/security/advisories/GHSA-g7f3-828f-7h7m and patch commit https://github.com/authlib/authlib/commit/e0863d5129316b1790eee5f14cece32a03b8184d (Debian users should apply the LTS update from lists.debian.org/debian-lts-announce/2025/10/msg00032.html). If upgrading is delayed: reject or strip 'zip':'DEF' from inbound JWE protected headers at the application boundary (rejects legitimate compressed tokens with a small bandwidth cost), fork and add a bounded guard via decompressobj().decompress(data, MAX_SIZE) returning an error when unconsumed_tail remains, or enforce strict maximum token sizes and fail fast on oversized inputs - and combine these with rate limiting to blunt repeated flooding attempts. Note these workarounds reduce functionality or require maintaining a vendor patch fork, so upgrading remains the preferred fix.
Affected Packages
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 library implementing OAuth 1/2 and OpenID Connect, including a JOSE stack (RFC 7516 JWE, RFC 7518 JWA). RFC 7518 defines the 'zip' header with the 'DEF' value, meaning the plaintext is DEFLATE-compressed before encryption; on decode, Authlib's DeflateZipAlgorithm.decompress called zlib.decompress(s, -zlib.MAX_WBITS) with raw-deflate mode and no output bound, and jwe.py assigned the full inflated buffer to the plaintext field. Since DEFLATE can exceed 1000:1 ratios on repetitive input, a tiny ciphertext became a decompression bomb (CWE-400, uncontrolled resource consumption). The upstream fix detects the gzip header (bytes 120,156) and uses zlib.decompressobj() with a 250 KB (MAX_SIZE) limit, raising ValueError when decompressor.unconsumed_tail is non-empty - mirroring the joserfc project's 256 KB ExceededSizeError guard.
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
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Network-reachable DEFLATE bomb is low-complexity and needs no user interaction, but attacker must supply a decryptable token (PR:L); impact is availability-only, so C:N/I:N/A:H.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JWE zip=DEF path performs unbounded DEFLATE decompression. A very small ciphertext can expand into tens or hundreds of megabytes on decrypt, allowing an attacker who can supply decryptable tokens to exhaust memory and CPU and cause denial of service. This issue has been patched in version 1.6.5. Workarounds for this issue involve rejecting or stripping zip=DEF for inbound JWEs at the application boundary, forking and add a bounded decompression guard via decompressobj().decompress(data, MAX_SIZE)) and returning an error when output exceeds a safe limit, or enforcing strict maximum token sizes and fail fast on oversized inputs; combine with rate limiting.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)CVE.org
Authlib is a Python library which builds OAuth and OpenID Connect servers. [CVSS 5.7 MEDIUM]
Authentication bypass in Authlib (Python OAuth/OpenID Connect library) versions 1.6.5 through 1.6.6 allows remote attack
Authlib is a Python library which builds OAuth and OpenID Connect servers. Rated high severity (CVSS 7.5), this vulnerab
Authlib's JOSE/JWS verification path (through 1.6.4, with 1.6.5 as the fix) decodes attacker-supplied JWT/JWS header and
lepture Authlib before 1.3.1 has algorithm confusion with asymmetric public keys. Rated high severity (CVSS 7.5), this v
Signature verification bypass in Authlib 1.7.2 and earlier allows unauthenticated remote attackers to have crafted JWS J
Poisoned OAuth/OIDC discovery metadata in Authlib 1.7.2 and earlier allows an attacker who controls or intercepts the me
Authentication bypass in the joserfc Python library before 1.7.4 lets remote, unauthenticated attackers submit a JWS Gen
Token forgery in the Authlib Python library before 1.9.1 lets a remote, unauthenticated attacker mint HS256, HS384 or HS
Authentication bypass in Authlib's deprecated-but-still-shipped authlib.jose module (1.3.1 through 1.8.0, fixed in 1.9.0
Authlib's default RFC 7523 JWT bearer grant, in all releases prior to 1.9.0, fails to bind an incoming JWT assertion to
Server-side request forgery in Authlib's RFC 9101 JWTAuthenticationRequest (JAR) extension lets unauthenticated remote a
NVD
CVE.org
EPSS
GitHub
Exploit-DB