Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. jwcrypto
  4. ›
  5. CVE-2026-39373

CVE-2026-39373: JWCrypto: JWE ZIP decompression bomb

April 8, 2026

The fix for GHSA-j857-7rvv-vj97 in v1.5.6 is weak in that it does not allow to fully control the amount of plaintext the receiver is willing to deal with and provides just a weak upper bound. The patch limits input token size to 250KB but does not validate the decompressed output size. An unauthenticated attacker can craft a JWE token under the 250KB input limit that decompresses to very large data that may exceed small devices memory availability, causing Denial of Service via memory exhaustion.

Although this is technically not unbounded I do recognize that it may be too much for devices and is something that could be surprising to developers, and we can do better than that.

NOTE: the original report was sloppy (probably AI slop) and claimed arbitrary memory consumption, but simple testing showed that while 100MB could be decompressed a 1GB output was denied because the token exceeded the 250K compressed serialization.

NOTE WELL: The proposed solution was also sloppy, proposing to first decompress the data completely in memory (therefore causing the memory exhaustion) and then checking how much memory was already used to deny the operation. I intentionally left the “details” section untouched to show how bad AI slop is and how uncritical the submitter was, even as it was obvious the “suggested fix” is actually no solution at all, as it was using the very call that he claimed was causing “arbitrary” memory exhaustion and wrapping it around an “if” … the actual solution is in the resolving commit in version 1.5.7

References

  • github.com/advisories/GHSA-fjrm-76x2-c4q4
  • github.com/latchset/jwcrypto
  • github.com/latchset/jwcrypto/security/advisories/GHSA-fjrm-76x2-c4q4
  • nvd.nist.gov/vuln/detail/CVE-2026-39373

Code Behaviors & Features

Detect and mitigate CVE-2026-39373 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 1.5.6

Solution

Unfortunately, there is no solution available yet.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)

Source file

pypi/jwcrypto/CVE-2026-39373.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:57 +0000.