Timing Attack Affecting safe-compare package, versions >=1.0.4 <1.1.4


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team

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-JS-SAFECOMPARE-173780
  • published 1 Mar 2019
  • disclosed 13 Mar 2019
  • credit hraban

Introduced: 1 Mar 2019

CVE NOT AVAILABLE CWE-208 Open this link in a new tab

How to fix?

Upgrade safe-compare to version 1.1.4 or higher.

Overview

safe-compare is a Constant-time comparison algorithm to prevent Node.js timing attacks.

Affected versions of this package are vulnerable to Timing Attack via the nativeTimingSafeEqual function which could leak the length of a user password. This is caused by always choosing the length of the longer string when comparing.

CVSS Scores

version 3.1
Expand this section

Snyk

3.1 low
  • Attack Vector (AV)
    Adjacent
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    Low
  • Integrity (I)
    None
  • Availability (A)
    None