CVE-2026-42576: Unchecked Crypto Key Type Assertion

Unchecked type assertion to a cryptographic key type (e.g., `*rsa.PublicKey`). If the interface contains a different type (for instance, an ECDSA key returned by an external JWKS endpoint instead of RSA), the assertion will panic and cause a Denial of Service. Use the `value, ok := ...` idiom to safely assert types.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-42576-unchecked-crypto-key-type-assertion --engine opengrep

Description

Unchecked type assertion to a cryptographic key type (e.g., `*rsa.PublicKey`). If the interface contains a different type (for instance, an ECDSA key returned by an external JWKS endpoint instead of RSA), the assertion will panic and cause a Denial of Service. Use the `value, ok := ...` idiom to safely assert types.