Access Restriction Bypass Affecting github.com/dgrijalva/jwt-go package, versions <4.0.0-preview1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.19% (59th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Access Restriction Bypass vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMDGRIJALVAJWTGO-596515
  • published13 Sept 2020
  • disclosed30 Jul 2020
  • creditchristopher-wong

Introduced: 30 Jul 2020

CVE-2020-26160  (opens in a new tab)
CWE-287  (opens in a new tab)

How to fix?

Upgrade github.com/dgrijalva/jwt-go to version 4.0.0-preview1 or higher.

Overview

github.com/dgrijalva/jwt-go is a go implementation of JSON Web Tokens.

Affected versions of this package are vulnerable to Access Restriction Bypass if m["aud"] happens to be []string{}, as allowed by the spec, the type assertion fails and the value of aud is "". This can cause audience verification to succeed even if the audiences being passed are incorrect if required is set to false.

CVSS Scores

version 3.1