Packages / cookie-signature / Security
cookie-signature Timing Attack
Affected releases · cookie-signature
- 1.x1.0.0 – 1.0.3Fixed in 1.0.4
- 0.0.x0.0.1No fix on this line yet
On 1.x, the newest line:
npm install cookie-signature@1.0.4Every release on a timeline
Affected
1.0.0 – 1.0.3
4 releases
Fixed
1.0.4 – 1.2.2
8 releases, latest
Affected
0.0.1
1 release
What happens
Affected versions of cookie-signature are vulnerable to timing attacks as a result of using a fail-early comparison instead of a constant-time comparison.
Timing attacks remove the exponential increase in entropy gained from increased secret length, by providing per-character feedback on the correctness of a guess via miniscule timing differences.
Under favorable network conditions, an attacker can exploit this to guess the secret in no more than charset*length guesses, instead of charset^length guesses required were the timing attack not present.
Recommendation
Update to 1.0.4 or later.