Vulnerability · Published Jan 9, 2024 · Assigned by GitHub_M
CVE-2024-21664Parsing JSON serialized payload without protected field can lead to segfault
Medium 4.3
In plain English
A medium-severity null pointer dereference in jwx from lestrrat-go. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 59% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
jwx is a Go module implementing various JWx (JWA/JWE/JWK/JWS/JWT, otherwise known as JOSE) technologies. Calling `jws.Parse` with a JSON serialized payload where the `signature` field is present while `protected` is absent can lead to a nil pointer dereference. The vulnerability can be used to crash/DOS a system doing JWS verification. This vulnerability has been patched in versions 2.0.19 and 1.2.28.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/lestrrat-go/jwx | 1.2.28 | GHSA-pvcr-v8j8-j5q3 |
| Go | github.com/lestrrat-go/jwx | 1.2.28 | GO-2024-2454 |
| Go | github.com/lestrrat-go/jwx/v2 | 2.0.19 | GHSA-pvcr-v8j8-j5q3 |
| Go | github.com/lestrrat-go/jwx/v2 | 2.0.19 | GO-2024-2454 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| lestrrat-go | jwx | >= 2.0.0, < 2.0.19>= 1.0.8, < 1.2.28 |
Weakness: CWE-476 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
References
- https://github.com/lestrrat-go/jwx/security/advisories/GHSA-pvcr-v8j8-j5q3 x_refsource_CONFIRM
- https://github.com/lestrrat-go/jwx/commit/0e8802ce6842625845d651456493e7c87625601f x_refsource_MISC
- https://github.com/lestrrat-go/jwx/commit/8c53d0ae52d5ab1e2b37c5abb67def9e7958fd65 x_refsource_MISC
- https://github.com/lestrrat-go/jwx/commit/d69a721931a5c48b9850a42404f18e143704adcd x_refsource_MISC