CVE-2026-39373: jwcrypto Memory Exhaustion Vulnerability Due to Unvalidated JWE Token Decompression
Summary
CVE-2026-39373: JWCrypto implements JWK, JWS, and JWE specifications using python-cryptography. Affects jwcrypto versions < 1.5.7. Fixed in 1.5.7. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
jwcrypto is a Python library that implements JSON Web Key (JWK), JSON Web Signature (JWS), and JSON Web Encryption (JWE) specifications using the python-cryptography library. It is widely used for secure data transmission and authentication in web applications. However, prior to version 1.5.7, jwcrypto had a vulnerability that allowed unauthenticated attackers to exploit memory resources on servers, particularly those with limited memory capacity.
Vulnerability Detail
The vulnerability arises from the handling of crafted JWE tokens that utilize ZIP compression. Although a patch was introduced to limit the input token size to 250KB, it failed to validate the size of the decompressed output. This oversight allows an attacker to send a token that, while under the input limit, can decompress to approximately 100MB, leading to memory exhaustion on affected systems. This poses a significant risk, especially for memory-constrained environments, as it can result in denial of service.
How To Fix
Minimum fixed version
1.5.7
This is the first release that contains the fix.
pip install --upgrade "jwcrypto==1.5.7"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can implement input validation on the server-side to limit the size of incoming JWE tokens before processing them. However, the best solution is to update to the patched version.
Conclusion
The CVE-2026-39373 vulnerability in the jwcrypto library poses a significant risk of memory exhaustion due to unvalidated decompression of JWE tokens. It is crucial for users of this library to update to version 1.5.7 or later to mitigate this risk effectively.
See every vulnerability recorded for jwcrypto →
FAQ
CVE-2026-39373 is a vulnerability in the jwcrypto library that allows unauthenticated attackers to exhaust server memory by sending specially crafted JWE tokens.
If your application uses jwcrypto versions prior to 1.5.7, it may be susceptible to memory exhaustion attacks, potentially leading to service outages.
If an immediate update is not possible, implement server-side validation to limit the size of incoming JWE tokens as a temporary measure.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score for this vulnerability is 5.3, indicating a moderate level of severity.
References
Related vulnerabilities
Recent vulnerabilities recorded for jwcrypto.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.