CVE-2025-59420
Python vulnerability analysis and mitigation

Overview

Authlib, a Python library for building OAuth and OpenID Connect servers, was found to have a security vulnerability (CVE-2025-59420) in versions prior to 1.6.4. The vulnerability relates to JWS verification accepting tokens that declare unknown critical header parameters (crit), which violates RFC 7515 'must-understand' semantics. This vulnerability was discovered and disclosed on September 20, 2025, affecting all versions up to 1.6.3 (GitHub Advisory).

Technical details

The vulnerability stems from Authlib's improper handling of the 'crit' (critical) header parameter in JWS tokens. When processing tokens containing unknown critical headers, Authlib incorrectly accepts and verifies them instead of rejecting them as required by RFC 7515 §4.1.11. The issue has been assigned a CVSS v3.1 Base Score of 7.5 (High) with a vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N. The vulnerability is classified under CWE-345 (Insufficient Verification of Data Authenticity) and CWE-863 (Incorrect Authorization) (GitHub Advisory).

Impact

The vulnerability enables attackers to craft signed tokens with critical headers (such as 'bork' or 'cnf') that strict verifiers reject but Authlib accepts. In mixed-language environments, this creates a split-brain verification scenario where some components reject tokens while Authlib-based services accept them. This can lead to policy bypass, replay attacks, or privilege escalation, particularly when critical headers carry security-sensitive semantics such as token binding (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Authlib version 1.6.4. Users should upgrade to this version or later. The fix involves proper enforcement of the 'crit' header during verification, rejecting tokens that list any critical parameter that is not explicitly understood and enforced (GitHub Advisory, GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-6237CRITICAL9.8
  • PythonPython
  • invokeai
NoNoSep 18, 2025
CVE-2025-9906HIGH8.6
  • PythonPython
  • keras
NoYesSep 19, 2025
CVE-2025-59420HIGH7.5
  • PythonPython
  • authlib
NoYesSep 22, 2025
CVE-2025-9905HIGH7.3
  • PythonPython
  • keras
NoYesSep 19, 2025
CVE-2025-40843MEDIUM5.9
  • PythonPython
  • codechecker
NoYesSep 22, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management