A flaw was found in the golang-jwt package. Unclear documentation of the error behavior in ParseWithClaims can lead to situation where users are not checking errors in the way they should be. Especially, if a token is both expired and invalid, the errors returned by ParseWithClaims return both error codes. If users only check for the jwt.ErrTokenExpired using error.Is, they can miss the embedded jwt.ErrTokenSignatureInvalid, and thus, potentially accept invalid tokens.
Exploitability
AV:NAC:HPR:NUI:RScope
S:UImpact
C:LI:NA:N3.1/CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N