CVE-2025-65015 joserfc has Possible Uncontrolled Resource Consumption Vulnerability Triggered by Logging Arbitrarily Large JWT Token Payloads
Attackers can cause resource exhaustion by sending large JWTs, triggering excessive logging in joserfc, requiring a non-default or missing web server configuration.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-65015?
CVE-2025-65015 is a critical denial of service vulnerability in authlib joserfc, published on 18 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. In versions from 1.3.3 to before 1.3.5 and from 1.4.0 to before 1.4.2, the ExceededSizeError exception messages are embedded with non-decoded JWT token parts and may cause Python logging to record an arbitrarily large, forged JWT payload. In situations where a misconfigured — or entirely absent — production-grade web server sits in front of a Python web application, an attacker may be able to send arbitrarily large bearer tokens in the HTTP request headers. When this occurs, Python logging or diagnostic tools (e.g., Sentry) may end up processing extremely large log messages containing the full JWT header during the joserfc.jwt.decode() operation. The same behavior also appears when validating claims and signature payload sizes, as the library raises joserfc.errors.ExceededSizeError() with the full payload embedded in the exception message. Since the payload is already fully loaded into memory at this stage, the library cannot prevent or reject it. This issue has been patched in versions 1.3.5 and 1.4.2.
Weakness: CWE-770
Which versions are affected by CVE-2025-65015?
5 open source packages ship an affected version, including joserfc. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
joserfc PyPI | From 1.3.3 | 1.3.5, 1.4.2 |
joserfc PyPI | From 1.3.3 | 1.3.5 |
joserfc PyPI | From 1.3.3 | 1.3.5 |
joserfc PyPI | From 1.4.0 | 1.4.2 |
joserfc PyPI | From 1.4.0 | 1.4.2 |
Products include Hsiaoming Joserfc.
How do I fix CVE-2025-65015?
Upgrade joserfc to a fixed version for your release line: 1.3.5 or 1.4.2.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-65015 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-65015 exists.
Other vulnerabilities in authlib joserfc
Sources
Also known as DEBIAN-CVE-2025-65015, GHSA-frfh-8v73-gjg4, PYSEC-2026-361, UBUNTU-CVE-2025-65015.