Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-65015: CWE-770: Allocation of Resources Without Limits or Throttling in authlib joserfc

0
Critical
VulnerabilityCVE-2025-65015cvecve-2025-65015cwe-770
Published: Tue Nov 18 2025 (11/18/2025, 23:07:44 UTC)
Source: CVE Database V5
Vendor/Project: authlib
Product: joserfc

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.

AI-Powered Analysis

AILast updated: 11/18/2025, 23:41:11 UTC

Technical Analysis

CVE-2025-65015 is a resource allocation vulnerability classified under CWE-770, found in the joserfc Python library, which implements JOSE standards for JSON Object Signing and Encryption. The affected versions (>=1.3.3,<1.3.5 and >=1.4.0,<1.4.2) improperly handle oversized JWT tokens by embedding the entire token payload into ExceededSizeError exception messages. When a large bearer token is sent in an HTTP request header, the library fully loads this token into memory during the decode operation and includes it in exception messages and logs. This behavior can cause excessive memory consumption and potentially lead to denial of service (DoS) conditions if logging or diagnostic tools (e.g., Sentry) process these large messages. The vulnerability arises because the library lacks limits or throttling on resource allocation when processing token sizes, and the exception handling mechanism inadvertently exposes the full payload. Exploitation does not require authentication or user interaction and can be triggered remotely if the web server in front of the Python application is misconfigured or absent, allowing large headers to pass through unchecked. The issue is mitigated in patched versions 1.3.5 and 1.4.2, which presumably implement size checks or avoid embedding full payloads in exceptions.

Potential Impact

For European organizations, this vulnerability poses a significant risk of denial of service attacks against web applications that use the vulnerable joserfc library versions. Attackers can exploit this flaw to exhaust server memory and processing resources by sending oversized JWT tokens, potentially causing application crashes or degraded performance. This can disrupt business operations, especially for services relying on JWT for authentication and authorization. Additionally, the exposure of full JWT payloads in logs may inadvertently leak sensitive information if logs are accessed by unauthorized parties. Organizations with misconfigured web servers that do not enforce request size limits are particularly vulnerable. The impact extends to any sector using Python-based web applications with joserfc, including finance, healthcare, government, and critical infrastructure in Europe, where service availability and data confidentiality are paramount.

Mitigation Recommendations

European organizations should immediately upgrade joserfc to versions 1.3.5 or 1.4.2 to apply the official patches addressing this vulnerability. In addition, they should configure web servers and reverse proxies to enforce strict limits on HTTP header sizes and overall request sizes to prevent oversized tokens from reaching the application layer. Implementing robust input validation and rate limiting on authentication endpoints can further reduce attack surface. Logging configurations should be reviewed to avoid recording excessively large messages or sensitive token contents; consider sanitizing logs or using structured logging that excludes full payloads. Monitoring for unusual spikes in request sizes or error rates related to JWT processing can help detect exploitation attempts. Finally, conduct security audits of Python web applications to identify usage of vulnerable joserfc versions and ensure timely patch management.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-11-13T15:36:51.680Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 691d040cb61595322dd84bc2

Added to database: 11/18/2025, 11:41:00 PM

Last enriched: 11/18/2025, 11:41:11 PM

Last updated: 11/19/2025, 1:59:27 AM

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats