Go JWT: MarshalJSON panic on invalid claim names via reflect.StructOf
CVE-2026-89315 Published on October 23, 2026
JwtClaims.MarshalJSON panics via reflect.StructOf when any untyped claim key is not a valid Go identifier suffix
`JwtClaims.MarshalJSON` built a Go struct at runtime with `reflect.StructOf`, synthesising a field named `"A" + claimName` for each untyped claim. `reflect.StructOf` **panics** when a field name is not a valid Go identifier, or when it duplicates another field. Both conditions are reachable from ordinary JWT claim names.
Vulnerability Analysis
CVE-2026-89315 can be exploited with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality and integrity and availability.
Weakness Type
Uncaught Exception
An exception is thrown from a function, but it is not caught. When an exception is not caught, it may cause the program to crash or expose sensitive information.
Affected Versions
Eclipse Foundation Eclipse KeyPont - GOSE:- Version 0.7.3, <= 0.13.0-rc1 is affected.
- Before 1.0.0-rc4 is affected.