Bug 2405946 (CVE-2025-62706)

Summary: CVE-2025-62706 authlib: Authlib : JWE zip=DEF decompression bomb enables DoS
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: anthomas, bdettelb, carogers, doconnor, ehelms, erezende, ggainey, haoli, hkataria, jajackso, jcammara, jmitchel, jneedle, juwatts, kegrant, koliveir, kshier, mabashia, mhulan, nmoumoul, osousa, pbraun, pcreech, rchan, shvarugh, simaishi, smallamp, smcdonal, stcannon, teagle, tfister, thavo, tmalecek, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A denial-of-service vulnerability exists in Authlib’s JWE (JSON Web Encryption) handling for zip=DEF compression. In versions prior to 1.6.5, the library performs unbounded DEFLATE decompression when processing JWE tokens with "zip": "DEF" in the header, without imposing a maximum size limit on the output. An attacker able to supply decryptable tokens could craft a compressed JWE ciphertext that expands to an arbitrarily large size, causing excessive memory and CPU consumption and potentially exhausting system resources.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-10-22 22:01:56 UTC
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.