LowGO-2023-2379CVE-2023-49290GHSA-7f9x-gw85-8grf

Denial of service due to malicious parameters in github.com/lestrrat-go/jwx

Published 11 Dec 2023 · 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.27
Fixed in
1.2.27
Update to the fixed version for your release line, for example:go get github.com/lestrrat-go/jwx@v1.2.27
Affected
<2.0.18
Fixed in
2.0.18
Update to the fixed version for your release line, for example:go get github.com/lestrrat-go/jwx/v2@v2.0.18

Details

The JWE key management algorithms based on PBKDF2 require a JOSE Header Parameter called p2c (PBES2 Count). This parameter dictates the number of PBKDF2 iterations needed to derive a CEK wrapping key. Its purpose is to intentionally slow down the key derivation function, making password brute-force and dictionary attacks more resource-intensive. However, if an attacker sets the p2c parameter in JWE to a very large number, it can cause excessive computational consumption.

Is GO-2023-2379 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-28122JWX vulnerable to a denial of service attack using compressed JWE message in github.com/lestrrat-go/jwx · 20 May 2024
  • MediumCVE-2024-28122JWX vulnerable to a denial of service attack using compressed JWE message · 8 Mar 2024
  • 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
  • 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.