LowGO-2024-2632CVE-2024-28122GHSA-hj3v-m684-v259

JWX vulnerable to a denial of service attack using compressed JWE message in github.com/lestrrat-go/jwx

Published 20 May 2024 · Updated 4 Feb 2026

Is your project on an affected github.com/lestrrat-go/jwx?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
<1.2.29
Fixed in
1.2.29
Update to the fixed version for your release line, for example:go get github.com/lestrrat-go/jwx@v1.2.29
Affected
<2.0.21
Fixed in
2.0.21
Update to the fixed version for your release line, for example:go get github.com/lestrrat-go/jwx/v2@v2.0.21

Details

An attacker with a trusted public key may cause a Denial-of-Service (DoS) condition by crafting a malicious JSON Web Encryption (JWE) token with an exceptionally high compression ratio. When this token is processed by the recipient, it results in significant memory allocation and processing time during decompression.

Is GO-2024-2632 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/lestrrat-go/jwx, and gives you the command that fixes it.

More advisories for github.com/lestrrat-go/jwx

  • LowCVE-2024-21664Panic due to nil pointer dereference in github.com/lestrrat-go/jwx/v2 · 23 Jan 2024
  • MediumCVE-2024-21664Parsing JSON serialized payload without protected field can lead to segfault · 9 Jan 2024
  • LowCVE-2023-49290Denial of service due to malicious parameters in github.com/lestrrat-go/jwx · 11 Dec 2023
  • MediumCVE-2023-49290lestrrat-go/jwx's malicious parameters in JWE can cause a DOS · 5 Dec 2023
  • LowGO-2023-1859Padding oracle vulnerability in github.com/lestrrat-go/jwx · 22 Jun 2023
  • MediumGHSA-rm8v-mxj3-5rmqgithub.com/lestrrat-go/jwx vulnerable to Potential Padding Oracle Attack · 14 Jun 2023
github.com/lestrrat-go/jwx security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.