Timing Attack Affecting github.com/robbert229/jwt package, versions <1.0.0


0.0
low

Snyk CVSS

    Attack Complexity High

    Threat Intelligence

    EPSS 0.11% (43rd percentile)
Expand this section
NVD
7.5 high

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-GITHUBCOMROBBERT229JWT-50051
  • published 1 Oct 2017
  • disclosed 31 Mar 2015
  • credit Vetcher

How to fix?

Upgrade github.com/robbert229/jwt to version 1.0.0 or higher.

Overview

Affected versions of this package are vulnerable to Timing Attack. The library uses the insecure, non-constant string comparison function strings.Compare(), instead of the time constant string comparison. As a result, the comparison will fail faster when the first characters in the HMAC are incorrect. An attacker can use this difference to perform a timing attack, essentially allowing them to guess the HMAC one character at a time.

Similar vulnerability was previously found in Google's Keyczar crytographic library.