CVE-2020-26160
JSON

7.5high

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

Severity
7.5high CVSS:3.1 by mitre
Exploit likelihood
2.16% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-w73w-5m7g-f7qcGO-2020-0017SNYK-GOLANG-GITHUBCOMDGRIJALVAJWTGO-596515

Description

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
github.com/dgrijalva/jwt-go (Go)from 0.0.0-20150717181359-44718f8a89b0 up to 3.2.0, from 0.0.0-20150717181359-44718f8a89b0GitHub Advisory Database, Go Vulnerability Database
github.com/dgrijalva/jwt-go/v4 (Go)before 4.0.0-preview1GitHub Advisory Database, Go Vulnerability Database
jwt-go_project jwt-goup to 3.2.0NVD

All scores

mitre7.5high CVSS:3.1CVSS:3.1/AC:L/AV:N/A:N/C:H/I:N/PR:N/S:U/UI:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:N/A:N

Classification

What each source says

CVE List

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.

GitHub Advisory Database

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

Go Vulnerability Database

If a JWT contains an audience claim with an array of strings, rather than a single string, and MapClaims.VerifyAudience is called with req set to false, then audience verification will be bypassed, allowing an invalid set of audiences to be provided.

NVD (es)

jwt-go versiones anteriores a 4.0.0-preview1, permite a atacantes omitir las restricciones de acceso previstas en situaciones con []string{} para m["aud"] (que está permitido por la especificación). Porque la aserción de tipo presenta un fallo, "" es el valor de aud. Este es un problema de seguridad si el token JWT es presentado para un servicio que carece de su propia comprobación de audiencia

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2020-26160 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-w73w-5m7g-f7qc changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2020-0017 changed 2026-07-08CC-BY-4.0
NVDCVE-2020-26160 changed 2026-06-17Public domain