Parsing JSON serialized payload without protected field can lead to segfault
lestrrat-go jwx
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/lestrrat-go/jwx Go |
|
|
| github.com/lestrrat-go/jwx/v2 Go |
|
|
lestrrat-go jwx
| Product | Affected | Fixed in |
|---|---|---|
| github.com/lestrrat-go/jwx Go |
|
|
| github.com/lestrrat-go/jwx/v2 Go |
|
|
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.
From the CVE record · GitHub_M
jwx can dereference a nil pointer when jws.Parse processes a JSON-serialized payload with a signature field but no protected field. An attacker who can supply such a payload to a system performing JWS verification can crash it; the input does not specify whether network access or authentication is required.
Check Go applications using github.com/lestrrat-go/jwx versions >=1.0.8 and <1.2.28, or github.com/lestrrat-go/jwx/v2 versions <2.0.19.