Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2020-26160 (High) detected in github.com/dgrijalva/jwt-go-v3.2.0 #354

Closed
mend-bolt-for-github bot opened this issue Jan 26, 2021 · 4 comments
Closed
Labels
security vulnerability Security vulnerability detected by WhiteSource

Comments

@mend-bolt-for-github
Copy link
Contributor

CVE-2020-26160 - High Severity Vulnerability

Vulnerable Library - github.com/dgrijalva/jwt-go-v3.2.0

Golang implementation of JSON Web Tokens (JWT)

Dependency Hierarchy:

  • github.com/dgrijalva/jwt-go-v3.2.0 (Vulnerable Library)

Found in HEAD commit: 86266a070a0504e2b0c6f3b89c04e1f472431af6

Found in base branch: master

Vulnerability Details

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.

Publish Date: 2020-09-30

URL: CVE-2020-26160

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.


Step up your Open Source Security Game with WhiteSource here

@mend-bolt-for-github mend-bolt-for-github bot added the security vulnerability Security vulnerability detected by WhiteSource label Jan 26, 2021
@bnfinet
Copy link
Member

bnfinet commented Jan 26, 2021

My initial take is that VP is not vulnerable...

"This is a security problem if the JWT token is presented to a service that lacks its own audience check."

/validate does include verifyUser()

I'll investigate further and confirm.

@bnfinet
Copy link
Member

bnfinet commented Jan 28, 2021

jwt-go has gone fallow. This discussion is trying to find the way forward...

dgrijalva/jwt-go#428

This fork has a fix
https://github.com/form3tech-oss/jwt-go

bnfinet added a commit that referenced this issue Jan 31, 2021
bnfinet added a commit that referenced this issue Jan 31, 2021
* move claims.Sites into claims.Audience
* move check Site to check Audience
* general cleanup
* rename CreateUserTokenString to NewVPJWT
@bnfinet
Copy link
Member

bnfinet commented Jan 31, 2021

The VP side aud check was there, though I've cleaned up the check to make it more apparent.

@bnfinet bnfinet mentioned this issue Jan 31, 2021
@bnfinet
Copy link
Member

bnfinet commented Feb 2, 2021

merged in v0.21.0

@bnfinet bnfinet closed this as completed Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security vulnerability Security vulnerability detected by WhiteSource
Projects
None yet
Development

No branches or pull requests

1 participant