CVE-2025-61920
Authlib is vulnerable to Denial of Service via Oversized JOSE Segments
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, 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. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.5
Authlib is vulnerable to Denial of Service via Oversized JOSE Segments
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, 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. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.
- Record
CVE-2025-61920- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-20, CWE-400, CWE-770
- Updated
- 2026-11-02
EUVDEUVD-2025-33768
7.5
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, 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. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.
- Record
EUVD-2025-33768- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-pq5p-34cr-23v9
7.5
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 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
Local demo (do not run against third-party systems): Download jws_segment_dos_demo.py the PoC in direcotry authlib/ Run following Command
python3 jws_segment_dos_demo.py --variant both --sizes "500MB" --fork-per-case
Environment: Python 3.13.6, Authlib 1.6.4, Linux x86_64, CPUs=8 Sample output: Refined <img width="1295" height="306" alt="image" src="https://github.com/user-attachments/assets/6dd8410f-bc36-4717-8cee-649bac9bf291" />
The compilation script prints separate “[ATTACKER]” (token construction) and “[SERVER]” (Authlib verification) RSS deltas so defenders can distinguish client-side preparation from server-side amplification. Regression tests authlib/tests/dos/test_jose_dos.py further capture the issue; the saved original_util.py/original_jws.py reproductions still accept the malicious payload.
Remediation
-
Apply the upstream patch that introduces decoded size limits:
-
MAX_HEADER_SEGMENT_BYTES = 256 KB
-
MAX_SIGNATURE_SEGMENT_BYTES = 256 KB
-
Enforce Limits in authlib/jose/util.extract_segment and _extract_signature.
-
Deploy the patched release immediately.
-
For additional defence in depth, reject JWS/JWT inputs above a few kilobytes at the proxy or WAF layer, and rate-limit verification endpoints.
Workarounds (temporary)
-
Enforce input size limits before handing tokens to Authlib.
-
Use application-level throttling to reduce amplification risk.
Resources
-
Demo script: jws_segment_dos_demo.py
-
Tests: authlib/tests/dos/test_jose_dos.py
-
OWASP JWT Cheat Sheet (DoS guidance)
- Record
GHSA-pq5p-34cr-23v9- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-20, CWE-400, CWE-770
- Updated
- 2026-11-02
NVD
7.5
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, 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. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.
- Record
CVE-2025-61920- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-20, CWE-400, CWE-770
- Updated
- 2026-11-02
OSV
7.5
Authlib is vulnerable to Denial of Service via Oversized JOSE Segments
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, 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. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.
- Record
CVE-2025-61920- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-20, CWE-400, CWE-770
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-61920
7.5
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, 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. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.
- Record
DEBIAN-CVE-2025-61920- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 7 moreShow less
OSVGHSA-pq5p-34cr-23v9
7.5
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 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
Local demo (do not run against third-party systems): Download jws_segment_dos_demo.py the PoC in direcotry authlib/ Run following Command
python3 jws_segment_dos_demo.py --variant both --sizes "500MB" --fork-per-case
Environment: Python 3.13.6, Authlib 1.6.4, Linux x86_64, CPUs=8 Sample output: Refined <img width="1295" height="306" alt="image" src="https://github.com/user-attachments/assets/6dd8410f-bc36-4717-8cee-649bac9bf291" />
The compilation script prints separate “[ATTACKER]” (token construction) and “[SERVER]” (Authlib verification) RSS deltas so defenders can distinguish client-side preparation from server-side amplification. Regression tests authlib/tests/dos/test_jose_dos.py further capture the issue; the saved original_util.py/original_jws.py reproductions still accept the malicious payload.
Remediation
-
Apply the upstream patch that introduces decoded size limits:
-
MAX_HEADER_SEGMENT_BYTES = 256 KB
-
MAX_SIGNATURE_SEGMENT_BYTES = 256 KB
-
Enforce Limits in authlib/jose/util.extract_segment and _extract_signature.
-
Deploy the patched release immediately.
-
For additional defence in depth, reject JWS/JWT inputs above a few kilobytes at the proxy or WAF layer, and rate-limit verification endpoints.
Workarounds (temporary)
-
Enforce input size limits before handing tokens to Authlib.
-
Use application-level throttling to reduce amplification risk.
Resources
-
Demo script: jws_segment_dos_demo.py
-
Tests: authlib/tests/dos/test_jose_dos.py
-
OWASP JWT Cheat Sheet (DoS guidance)
- Record
GHSA-pq5p-34cr-23v9- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-20, CWE-400, CWE-770
- Updated
- 2026-11-02
OSVPYSEC-2026-1203
7.5
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 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
Local demo (do not run against third-party systems): Download jws_segment_dos_demo.py the PoC in direcotry authlib/ Run following Command
python3 jws_segment_dos_demo.py --variant both --sizes "500MB" --fork-per-case
Environment: Python 3.13.6, Authlib 1.6.4, Linux x86_64, CPUs=8 Sample output: Refined <img width="1295" height="306" alt="image" src="https://github.com/user-attachments/assets/6dd8410f-bc36-4717-8cee-649bac9bf291" />
The compilation script prints separate “[ATTACKER]” (token construction) and “[SERVER]” (Authlib verification) RSS deltas so defenders can distinguish client-side preparation from server-side amplification. Regression tests authlib/tests/dos/test_jose_dos.py further capture the issue; the saved original_util.py/original_jws.py reproductions still accept the malicious payload.
Remediation
-
Apply the upstream patch that introduces decoded size limits:
-
MAX_HEADER_SEGMENT_BYTES = 256 KB
-
MAX_SIGNATURE_SEGMENT_BYTES = 256 KB
-
Enforce Limits in authlib/jose/util.extract_segment and _extract_signature.
-
Deploy the patched release immediately.
-
For additional defence in depth, reject JWS/JWT inputs above a few kilobytes at the proxy or WAF layer, and rate-limit verification endpoints.
Workarounds (temporary)
-
Enforce input size limits before handing tokens to Authlib.
-
Use application-level throttling to reduce amplification risk.
Resources
-
Demo script: jws_segment_dos_demo.py
-
Tests: authlib/tests/dos/test_jose_dos.py
-
OWASP JWT Cheat Sheet (DoS guidance)
- Record
PYSEC-2026-1203- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVROOT-APP-PYPI-CVE-2025-61920
7.5
CVE-2025-61920 in rootio-Authlib - Patched by Root
Root has patched CVE-2025-61920 in the rootio-Authlib package for Root:PyPI. Multiple fixed versions available.
- Record
ROOT-APP-PYPI-CVE-2025-61920- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-61920
7.5
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, 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. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.
- Record
UBUNTU-CVE-2025-61920- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15629-1 No score
python311-Authlib-1.6.5-1.1 on GA media
These are all security issues fixed in the python311-Authlib-1.6.5-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15629-1- Updated
- 2026-11-02
OSVSUSE-SU-2025:3754-1 No score
Security update for python-Authlib
This update for python-Authlib fixes the following issues:
- CVE-2025-61920: limited the size of the header to prevent DoS (bsc#1251921).
- Record
SUSE-SU-2025:3754-1- Updated
- 2026-11-02
OSVUSN-8065-1 No score
python-authlib vulnerabilities
Millie Solem discovered that Authlib did not properly restrict algorithm selection during JWT verification, allowing HMAC verification with asymmetric public keys when no algorithm was specified. A remote attacker could possibly use this issue to bypass signature verification and forge tokens, resulting in authentication bypass or privilege escalation. (CVE-2024-37568)
Muhammad Noman Ilyas discovered that Authlib did not properly enforce critical header parameter handling during JSON Web Signature verification, leading to unknown critical parameters being incorrectly accepted. A remote attacker could possibly use this issue to bypass security policies in mixed deployments, resulting in authentication bypass, replay attacks, or privilege escalation. (CVE-2025-59420)
Muhammad Noman Ilyas discovered that Authlib did not properly limit the size of JSON Web Signature or JSON Web Token header and signature segments. A remote attacker could possibly use this issue to cause excessive memory or processor consumption, leading to a denial of service. (CVE-2025-61920)
Muhammad Noman Ilyas discovered that Authlib performed unbounded decompression when processing certain compressed encrypted tokens. A remote attacker could possibly use this issue to send a specially crafted token that can be expanded to a large size during decompression, causing a denial of service. (CVE-2025-62706)
It was discovered that Authlib did not properly bind cached state information to the initiating user session during OAuth authentication flows. A remote attacker could possibly use this issue to perform cross- site request forgery attacks, resulting in unauthorized actions or authentication bypass. This issue only affected Ubuntu 24.04 LTS. (CVE-2025-68158)
- Record
USN-8065-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
authlibPyPI |
before 1.6.5 | 1.6.5 |
python-authlibDebian:12 |
before 1.2.0-1+deb12u1, plus listed versions 1.2.0-1 |
1.2.0-1+deb12u1 |
python-authlibDebian:13 |
before 1.6.0-1+deb13u1, plus listed versions 1.6.0-1 |
1.6.0-1+deb13u1 |
python-authlibDebian:14 |
before 1.6.5-1, plus listed versions 1.6.0-11.6.1-11.6.3-11.6.4-1 |
1.6.5-1 |
python-authlibDebian:11 From an advisory covering 4 CVEs |
before 0.15.4-1+deb11u1, plus listed versions 0.15.4-1 |
0.15.4-1+deb11u1 |
authlibPyPI |
before 1.6.5, plus listed versions 0.10.100.110.120.12.1 Show 45 moreShow less0.130.140.14.10.14.20.14.30.150.15.10.15.20.15.30.15.40.15.50.15.60.1rc00.20.2.10.30.40.4.10.50.5.10.60.70.80.91.0.01.0.0a11.0.0a21.0.0b11.0.0b21.0.0rc11.0.11.1.01.2.01.2.11.3.01.3.11.3.21.4.01.4.11.5.01.5.11.5.21.6.01.6.11.6.2 |
1.6.5 |
rootio-AuthlibRoot:PyPI |
before 1.6.4+root.io.1 | 1.6.4+root.io.11.3.1+root.io.11.6.3+root.io.11.6.2+root.io.11.6.0+root.io.10.15.5+root.io.11.3.2+root.io.11.6.1+root.io.11.3.1+root.io.21.6.3+root.io.20.15.5+root.io.31.6.0+root.io.21.6.3+root.io.30.15.5+root.io.40.15.5+root.io.51.6.1+root.io.21.6.0+root.io.31.6.3+root.io.41.6.1+root.io.30.15.5+root.io.61.6.0+root.io.41.6.3+root.io.51.6.1+root.io.40.15.5+root.io.70.15.5+root.io.81.6.1+root.io.50.15.5+root.io.91.6.3+root.io.61.3.1+root.io.31.6.2+root.io.21.6.4+root.io.21.6.0+root.io.51.6.1+root.io.61.3.2+root.io.2 |
AuthlibRoot:PyPI |
before 0.15.5+aikido.9 | 0.15.5+aikido.91.6.3+aikido.61.3.1+aikido.31.6.2+aikido.21.6.4+aikido.21.6.0+aikido.51.6.1+aikido.61.3.2+aikido.2 |
python-AuthlibSUSE:Linux Enterprise Module for Python 3 15 SP6 |
before 1.3.1-150600.3.6.1 | 1.3.1-150600.3.6.1 |
python-AuthlibSUSE:Linux Enterprise Module for Python 3 15 SP7 |
before 1.3.1-150600.3.6.1 | 1.3.1-150600.3.6.1 |
Show 8 moreShow less
| Package | Affected | Fixed |
|---|---|---|
python-AuthlibopenSUSE:Leap 15.6 |
before 1.3.1-150600.3.6.1 | 1.3.1-150600.3.6.1 |
python-authlibUbuntu:Pro:22.04:LTS |
before 0.15.5-1ubuntu0.1~esm1, plus listed versions 0.15.4-10.15.5-1 |
0.15.5-1ubuntu0.1~esm1 |
python-authlibUbuntu:Pro:24.04:LTS |
before 1.3.0-1ubuntu0.1~esm1, plus listed versions 1.2.1-11.3.0-1 |
1.3.0-1ubuntu0.1~esm1 |
python-authlibUbuntu:25.10 |
All versions, plus listed versions 1.5.1-11.5.2-11.6.0-1 |
None known |
python-authlibUbuntu:Pro:26.04:LTS |
All versions, plus listed versions 1.6.0-11.6.5-11.6.6-11.6.7-11.6.7-1ubuntu0.1~esm1 |
None known |
python-authlibUbuntu:Pro:22.04:LTS From an advisory covering 5 CVEs |
before 0.15.5-1ubuntu0.1~esm1, plus listed versions 0.15.4-10.15.5-1 |
0.15.5-1ubuntu0.1~esm1 |
python-authlibUbuntu:Pro:24.04:LTS From an advisory covering 5 CVEs |
before 1.3.0-1ubuntu0.1~esm1, plus listed versions 1.2.1-11.3.0-1 |
1.3.0-1ubuntu0.1~esm1 |
python-AuthlibopenSUSE:Tumbleweed |
before 1.6.5-1.1 | 1.6.5-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-61920 is a high vulnerability (CVSS 7.5) in Authlib, published October 10, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.64%, the 50th percentile. Fixed in authlib 1.6.5.
References
github.com/authlib/authlib/security/advisories/GHSA-pq5p-34cr-23v9
github.com/authlib/authlib/commit/867e3f87b072347a1ae9cf6983cc8bbf88447e5e
lists.debian.org/debian-lts-announce/2025/10/msg00032.html
nvd.nist.gov/vuln/detail/CVE-2025-61920
github.com/advisories/GHSA-pq5p-34cr-23v9
github.com/CVEProject/cvelistV5/tree/main/cves/2025/61xxx/CVE-2025-61920.json
Show 13 moreShow less
security-tracker.debian.org/tracker/CVE-2025-61920
github.com/authlib/authlib
pypi.org/project/authlib
suse.com/support/update/announcement/2025/suse-su-20253754-1
bugzilla.suse.com/1251921
suse.com/security/cve/CVE-2025-61920
ubuntu.com/security/CVE-2025-61920
cve.org/CVERecord?id=CVE-2025-61920
ubuntu.com/security/notices/USN-8065-1
ubuntu.com/security/CVE-2024-37568
ubuntu.com/security/CVE-2025-59420
ubuntu.com/security/CVE-2025-62706
ubuntu.com/security/CVE-2025-68158
Left out here: 2 versions. The JSON record has them.