CVE-2020-26160:
Authorization bypass in github.com/dgrijalva/jwt-go
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.13749%
CWE
Published
5/18/2021
Updated
5/20/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/dgrijalva/jwt-go/v4 | go | < 4.0.0-preview1 | 4.0.0-preview1 |
github.com/dgrijalva/jwt-go | go | >= 0.0.0-20150717181359-44718f8a89b0, <= 3.2.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper type handling in JWT audience validation. The key vulnerable functions are:
- MapClaims.VerifyAudience: Directly responsible for unsafe type assertion of 'aud' claim
- verifyAud: Implemented the actual audience check logic with string-based comparison Together they failed to handle RFC-compliant array audiences, returning empty string from failed type assertion and passing invalid verification. The commit diff shows these functions were modified to add ClaimStrings type handling, confirming their role in the vulnerability.