CVE-2024-28102: jwcrypto Package Vulnerable to JWT Bomb Attack Leading to Denial of Service

jwcrypto Updated 07 Jul 2026

Summary

07/07/2026
Yes i
Moderate
6.8

CVE-2024-28102: JWCrypto vulnerable to JWT bomb Attack in deserialize function. Affects jwcrypto versions < 1.5.6. Fixed in 1.5.6. How to fix ↓

Also tracked for

The same CVE-2024-28102 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The jwcrypto package is a Python library that provides tools for creating and managing JSON Web Tokens (JWTs) and JSON Web Encryption (JWE). It allows developers to securely transmit information between parties as a JSON object. However, the package is vulnerable to a specific attack known as a JWT bomb, which can lead to Denial of Service (DoS) by consuming excessive memory and processing time.

Vulnerability Detail

The vulnerability arises from the deserialize function in the jwcrypto library, where an attacker can exploit the handling of malicious JWE tokens with high compression ratios. By sending a specially crafted token, the server can be forced to use an inordinate amount of resources, leading to potential service outages. This issue is particularly concerning as it can be executed with minimal effort, making it a significant threat to applications relying on this library.

How To Fix

Latest published version: 1.6.1 as of 22 Oct 2026

pip install --upgrade "jwcrypto==1.6.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.5.6

This is the first release that contains the fix.

pip install --upgrade "jwcrypto==1.5.6"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can limit the maximum token length to 250K characters. This approach has been successfully implemented in other libraries to mitigate similar vulnerabilities. Implementing this limit can help prevent attackers from exploiting the high compression ratio of tokens.

Conclusion

The jwcrypto package is vulnerable to a JWT bomb attack, which can lead to Denial of Service by consuming excessive resources. It is crucial to update to the patched version 1.5.6 or later to mitigate this risk. Implementing a maximum token length limit can also serve as a temporary workaround. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.

See every vulnerability recorded for jwcrypto →

Share this vulnerability

FAQ

A JWT bomb attack is a type of Denial of Service (DoS) attack where an attacker sends a malicious JSON Web Encryption (JWE) token that consumes excessive memory and processing time when processed by the server.

You can check if your application is affected by using the Vulert playground at Vulert Scanner. It allows you to monitor and alert for open-source vulnerabilities without requiring any signup.

If exploited, this vulnerability can lead to service outages, as the server may become unresponsive due to high resource consumption caused by processing malicious tokens.

Yes, the vulnerability has been patched in version 1.5.6 of the jwcrypto package. It is recommended to update to this version or later.

The CVSS score of this vulnerability is 6.8, indicating a medium severity level that requires attention.

Related vulnerabilities

Recent vulnerabilities recorded for jwcrypto.

How To Fix

Latest published version: 1.6.1 as of 22 Oct 2026

pip install --upgrade "jwcrypto==1.6.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.5.6

This is the first release that contains the fix.

pip install --upgrade "jwcrypto==1.5.6"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback