Timing Attack Affecting github.com/robbert229/jwt Open this link in a new tab package, versions <1.0.0
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
1 Oct 2017
31 Mar 2015
Introduced: 31 Mar 2015CWE-208 Open this link in a new tab
How to fix?
github.com/robbert229/jwt to version 1.0.0 or higher.
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.