ADVISORIES

Go Vulnerability Database

GO-2023-2379

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

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.

Affected packages

EcosystemPackageAffected versions
Gogithub.com/lestrrat-go/jwx
All versions before 1.2.27 (fixed in 1.2.27)
Gogithub.com/lestrrat-go/jwx/v2
All versions before 2.0.18 (fixed in 2.0.18)

References