Skip to content

Authorization bypass in github.com/dgrijalva/jwt-go

High severity GitHub Reviewed Published May 18, 2021 to the GitHub Advisory Database • Updated Aug 29, 2023

Package

gomod github.com/dgrijalva/jwt-go (Go)

Affected versions

<= 3.2.0

Patched versions

None
gomod github.com/dgrijalva/jwt-go/v4 (Go)
< 4.0.0-preview1
4.0.0-preview1

Description

jwt-go allows attackers to bypass intended access restrictions in situations with []string{} for m["aud"] (which is allowed by the specification). Because the type assertion fails, "" is the value of aud. This is a security problem if the JWT token is presented to a service that lacks its own audience check. There is no patch available and users of jwt-go are advised to migrate to golang-jwt at version 3.2.1

References

Published by the National Vulnerability Database Sep 30, 2020
Reviewed May 18, 2021
Published to the GitHub Advisory Database May 18, 2021
Last updated Aug 29, 2023

Severity

High
7.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

CVE ID

CVE-2020-26160

GHSA ID

GHSA-w73w-5m7g-f7qc

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.