#1145983 python-jwcrypto: CVE-2026-80179

Package:
src:python-jwcrypto
Source:
src:python-jwcrypto
Submitter:
Salvatore Bonaccorso
Date:
2026-11-03 04:51:01 UTC
Severity:
normal
Tags:
#1145983#5
Date:
2026-08-28 14:13:58 UTC
From:
To:
Hi,

The following vulnerability was published for python-jwcrypto.

CVE-2026-80179[0]:
| A flaw was found in jwcrypto. A remote attacker can send a specially
| crafted JSON Web Encryption (JWE) token containing numerous period
| delimiters. This malformed token can force the JWE.deserialize()
| function to allocate excessive memory, leading to a MemoryError.
| This issue results in a denial of service (DoS) for services that
| process untrusted JWE values.


If you fix the vulnerability please also make sure to include the
CVE (Common Vulnerabilities & Exposures) id in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2026-80179
https://www.cve.org/CVERecord?id=CVE-2026-80179
[1] https://github.com/latchset/jwcrypto/security/advisories/GHSA-96rv-c4vc-h4f4

Please adjust the affected versions in the BTS as needed.

Regards,
Salvatore

#1145983#10
Date:
2026-11-03 04:48:02 UTC
From:
To:
Hi,

The fix for CVE-2026-80179 (GHSA-96rv-c4vc-h4f4, fixed in jwcrypto 1.5.9)
is this commit:

https://www.google.com/url?q=https://github.com/latchset/jwcrypto/commit/1a7737d6eb&source=gmail&ust=1793767682030000&sa=E
"Limit dot splits during JWE and JWS parsing"

The code change is two lines. It bounds the compact-serialization split
in JWE.deserialize() and JWS.deserialize(), and the commit also adds
regression tests:

jwe.py: data = raw_jwe.split('.') -> data = raw_jwe.split('.', 5)
jws.py: data = raw_jws.split('.') -> data = raw_jws.split('.', 3)

Verified on the Debian 1.5.6-1.2 source with its debian/patches applied.
The commit applies with line offsets only.

- Parsing a malformed compact JWE made of 2,000,000 '.' characters
(tracemalloc peak):
1.5.6-1.2: 17.2 MB, 22.8 ms (grows linearly with input size)
patched: 2.0 MB, 1.6 ms (just the input string itself)
Both raise InvalidJWEData; the patched version no longer builds the
large intermediate list first.
- Upstream tests (jwcrypto/tests.py and tests-cookbook.py):
unpatched: 123 passed
patched: 125 passed (the 2 new regression tests), 0 failed

The patch is small enough to carry until 1.5.9 or later is packaged.

Thanks!