Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/dgrijalva/jwt-go/v4
  4. ›
  5. CVE-2020-26160

CVE-2020-26160: Improper Handling of Exceptional Conditions

May 18, 2021 (updated February 7, 2023)

jwt-go before 4.0.0-preview1 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.

References

  • github.com/advisories/GHSA-w73w-5m7g-f7qc
  • github.com/dgrijalva/jwt-go/commit/ec0a89a131e3e8567adcb21254a5cd20a70ea4ab
  • github.com/dgrijalva/jwt-go/issues/422
  • github.com/dgrijalva/jwt-go/issues/462
  • github.com/dgrijalva/jwt-go/pull/426
  • nvd.nist.gov/vuln/detail/CVE-2020-26160
  • pkg.go.dev/vuln/GO-2020-0017
  • snyk.io/vuln/SNYK-GOLANG-GITHUBCOMDGRIJALVAJWTGO-596515

Code Behaviors & Features

Detect and mitigate CVE-2020-26160 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 4.0.0-preview1

Fixed versions

  • v4.0.0-preiew1

Solution

Upgrade to version 4.0.0-preview1 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-287: Improper Authentication
  • CWE-755: Improper Handling of Exceptional Conditions

Source file

go/github.com/dgrijalva/jwt-go/v4/CVE-2020-26160.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:00 +0000.