---
id: "CVE-2026-89316"
kind: "vulnerability"
aliases: ["CVE-2026-89316"]
title: "Go JWK parser: panic from unchecked ECDSA type assertion on crafted key"
severity: "medium"
cvss: 6.3
epss: 0.00207
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["go", "jwk", "jwt", "package"]
not_affected_if: ["no-untrusted-jwk-input"]
published_at: "2026-10-23T09:17:08+00:00"
first_seen_at: "2026-10-23T21:57:32+00:00"
updated_at: "2026-10-25T04:00:05+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-89316", "first_seen_at": "2026-10-23T21:57:32+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-89316", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# Go JWK parser: panic from unchecked ECDSA type assertion on crafted key

LoadPublicKey resolves an EC key's curve with an unchecked type assertion, so a JWK with kty EC and a non-EC alg value makes the parser panic. An attacker who can supply such a key crashes the process that parses it, a denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- unknown

## Fix

- unknown

## Timeline

- 2026-10-23T21:57:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-89316
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-89316

## From the sources

`LoadPublicKey` resolved an EC key's curve with an unchecked type assertion, `algToOptsMap[alg].(*ECDSAOptions)`. A JWK declaring `"kty":"EC"` together with a non-EC `"alg"` — which RFC 7517 §4.4 permits — reaches that assertion and **panics**.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
