Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. authlib
  4. ›
  5. CVE-2025-61920

CVE-2025-61920: Authlib is vulnerable to Denial of Service via Oversized JOSE Segments

October 10, 2025 (updated October 13, 2025)

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 huge buffers pegs CPU and allocates large amounts of RAM; a single request can exhaust service capacity.

  • Observed behaviour: on a test host, the legacy code verified a 500 MB header, consuming ~4 GB RSS and ~9 s CPU before failing.

  • Severity: High. CVSS v3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (7.5).

Affected Versions Authlib ≤ 1.6.3 (and earlier) when verifying JWS/JWT tokens. Later snapshots with 256 KB header/signature limits are not affected.

Proof of concept

References

  • github.com/advisories/GHSA-pq5p-34cr-23v9
  • github.com/authlib/authlib
  • github.com/authlib/authlib/commit/867e3f87b072347a1ae9cf6983cc8bbf88447e5e
  • github.com/authlib/authlib/security/advisories/GHSA-pq5p-34cr-23v9
  • nvd.nist.gov/vuln/detail/CVE-2025-61920

Code Behaviors & Features

Detect and mitigate CVE-2025-61920 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.6.5

Fixed versions

  • 1.6.5

Solution

Upgrade to version 1.6.5 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation
  • CWE-400: Uncontrolled Resource Consumption
  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

pypi/authlib/CVE-2025-61920.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 16 Oct 2025 12:20:38 +0000.