Advisories for Pypi/Authlib package

2026

Authlib has 1-click Account Takeover vulnerability

I am writing to you from the Security Labs team at Snyk to report a security issue affecting Authlib, which we identified during a recent research project. We have identified a vulnerability that can result in a 1-click Account Takeover in applications that use the Authlib library. (5.7 CVSS v3: AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N) Description Cache-backed state/request-token storage is not tied to the initiating user session, so CSRF is possible for any attacker …

2025

Authlib is vulnerable to Denial of Service via Oversized JOSE Segments

Summary 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. Impact Attack vector: unauthenticated network attacker submits a malicious JWS/JWT. Effect: base64 decode + JSON/crypto processing of …

Authlib: JWS/JWT accepts unknown crit headers (RFC violation → possible authz bypass)

Authlib’s JWS verification accepts tokens that declare unknown critical header parameters (crit), violating RFC 7515 “must‑understand” semantics. An attacker can craft a signed token with a critical header (for example, bork or cnf) that strict verifiers reject but Authlib accepts. In mixed‑language fleets, this enables split‑brain verification and can lead to policy bypass, replay, or privilege escalation.

2024