Insecure Credential Comparison Affecting safe-compare package, versions <1.1.1



    Attack Complexity High
    Integrity High

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 npm:safe-compare:20180210
  • published 14 Feb 2018
  • disclosed 9 Feb 2018
  • credit James Billingham

Introduced: 9 Feb 2018

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

How to fix?

Upgrade safe-compare to version 1.1.1 or higher.


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

Affected versions of the package are vulnerable to Insecure Credential Comparison due to using String.prototype.length instead of Buffer.byteLength.