Skip to content
Heist/ feed
Back to feed
Medium

Parsing JSON serialized payload without protected field can lead to segfault

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-21664
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 19:21 UTC · Revision 1

Source evidence

Parsing JSON serialized payload without protected field can lead to segfault

core-osv · Original source

Published 9 Jan 2024, 19:18 UTC

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.

osv:CVE-2024-21664
Complete source record
{
  "id": "61b737a334f87db62033037eb2154b961e9cbb80dc49796bfe7714ddcab8751b",
  "url": "https://osv.dev/vulnerability/CVE-2024-21664",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Parsing JSON serialized payload without protected field can lead to segfault",
    "summary": "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.",
    "evidence": "osv:CVE-2024-21664",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-21664",
      "aliases": [
        "CVE-2024-21664",
        "GHSA-pvcr-v8j8-j5q3",
        "GO-2024-2454"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/lestrrat-go/jwx",
              "type": "GIT",
              "events": [
                {
                  "introduced": "8f97f606570bc3de90005ce3188824e7e7eff88a"
                },
                {
                  "fixed": "d69a721931a5c48b9850a42404f18e143704adcd"
                },
                {
                  "introduced": "3bb9a18ceb5f45ffc4d0b837f85a5c3eb3f0bbfe"
                },
                {
                  "fixed": "8c53d0ae52d5ab1e2b37c5abb67def9e7958fd65"
                },
                {
                  "fixed": "0e8802ce6842625845d651456493e7c87625601f"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "2.0.0"
                      },
                      {
                        "fixed": "2.0.19"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "introduced": "1.0.8"
                      },
                      {
                        "fixed": "1.2.28"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "0e8802ce6842625845d651456493e7c87625601f"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "8c53d0ae52d5ab1e2b37c5abb67def9e7958fd65"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "d69a721931a5c48b9850a42404f18e143704adcd"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.2.27",
            "v2.0.18",
            "v1.2.26",
            "v2.0.17",
            "v2.0.16",
            "v2.0.15",
            "v2.0.14",
            "v2.0.10",
            "v1.2.25",
            "v2.0.9",
            "v2.0.8",
            "v2.0.7",
            "v2.0.6",
            "v2.0.5",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v1.2.24",
            "v2.0.0",
            "v1.2.23",
            "v1.2.22",
            "v1.2.21",
            "v1.2.20",
            "v1.2.19",
            "v1.2.18",
            "v1.2.17",
            "v1.2.15",
            "v1.2.14",
            "v1.2.13",
            "v1.2.12",
            "v1.2.11",
            "v1.2.10",
            "v1.2.9",
            "v1.2.8",
            "v1.2.7",
            "v1.2.6",
            "v1.2.5",
            "v1.2.4",
            "v1.2.3",
            "v1.2.2",
            "v1.2.1",
            "v1.2.0",
            "v1.1.8-rc1",
            "v1.1.7",
            "v1.1.7-rc1",
            "v1.1.6",
            "v1.1.5",
            "v1.1.5-rc1",
            "v1.1.4",
            "v1.1.3",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.8"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21664.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.771807040Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21664.json",
        "https://github.com/lestrrat-go/jwx/security/advisories/GHSA-pvcr-v8j8-j5q3",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-21664",
        "https://github.com/lestrrat-go/jwx/commit/0e8802ce6842625845d651456493e7c87625601f",
        "https://github.com/lestrrat-go/jwx/commit/8c53d0ae52d5ab1e2b37c5abb67def9e7958fd65",
        "https://github.com/lestrrat-go/jwx/commit/d69a721931a5c48b9850a42404f18e143704adcd"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-476"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21664.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-21664",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 506108,
  "published_at": "2024-01-09T19:18:03.742+00:00"
}