The library implemented a character to character comparison, similar to the built-in string comparison mechanism,
===, and not a 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.
You can read more about timing attacks in Node.js on the Snyk blog.
fernet to version 0.1.0 or higher.
- Chris Continanza
- Snyk ID
- 06 Mar, 2014
- 22 Nov, 2016