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 package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| github.com/dgrijalva/jwt-go (Go) | from 0.0.0-20150717181359-44718f8a89b0 up to 3.2.0, from 0.0.0-20150717181359-44718f8a89b0 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/dgrijalva/jwt-go/v4 (Go) | before 4.0.0-preview1 | GitHub Advisory Database, Go Vulnerability Database |
| jwt-go_project jwt-go | up to 3.2.0 | NVD |
All scores
| mitre | 7.5high CVSS:3.1 | CVSS:3.1/AC:L/AV:N/A:N/C:H/I:N/PR:N/S:U/UI:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 5.0medium CVSS:2.0 | AV: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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2020-26160 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-w73w-5m7g-f7qc changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2020-0017 changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2020-26160 changed 2026-06-17 | Public domain |