Packages / cookie-signature / Security

ModerateVulnerabilityGHSA-92vm-wfm5-mxvvCVE-2016-1000236Published 6 Jan 2020

cookie-signature Timing Attack

Your version

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.4
Every release on a timeline
1.x
  1. Affected

    1.0.0 – 1.0.3

    4 releases

  2. Fixed

    1.0.4 – 1.2.2

    8 releases, latest

0.x
  1. Affected

    0.0.1

    1 release

13 stable releases of cookie-signature, oldest to newest, one row per major.

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.