Insufficient Documentation of Error Handling Techniques Affecting github.com/golang-jwt/jwt/v4 package, versions <4.5.1


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.04% (11th 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 ID SNYK-GOLANG-GITHUBCOMGOLANGJWTJWTV4-8341242
  • published 5 Nov 2024
  • disclosed 4 Nov 2024
  • credit yuligesec

How to fix?

Upgrade github.com/golang-jwt/jwt/v4 to version 4.5.1 or higher.

Overview

Affected versions of this package are vulnerable to Insufficient Documentation of Error Handling Techniques in the ParseWithClaims function. An attacker can exploit this to accept invalid tokens by only checking for specific errors and ignoring others.

Workaround

Users who are not able to upgrade to the fixed version should make sure that they are properly checking for all errors, see example_test.go

References

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
2.3 low
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Passive
  • Confidentiality (VC)
    Low
  • Integrity (VI)
    None
  • Availability (VA)
    None
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None