Go Vulnerability Database
GO-2024-2632
JWX vulnerable to a denial of service attack using compressed JWE message in github.com/lestrrat-go/jwx
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.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Go | github.com/lestrrat-go/jwx | All versions before 1.2.29 (fixed in 1.2.29) |
| Go | github.com/lestrrat-go/jwx/v2 | All versions before 2.0.21 (fixed in 2.0.21) |
References
- https://github.com/lestrrat-go/jwx/security/advisories/GHSA-hj3v-m684-v259
- https://github.com/lestrrat-go/jwx/commit/d01027d74c7376d66037a10f4f64af9af26a7e34
- https://github.com/lestrrat-go/jwx/commit/d43f2ceb7f0c13714dfe8854d6439766e86faa76
- https://github.com/lestrrat-go/jwx/releases/tag/v1.2.29
- https://github.com/lestrrat-go/jwx/releases/tag/v2.0.21