Insecure Comparison Affecting secure-compare package, versions <3.0.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.08% (36th percentile)

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 IDnpm:secure-compare:20151024
  • published6 Nov 2015
  • disclosed24 Oct 2015
  • creditJoshua Dague

Introduced: 24 Oct 2015

CVE-2015-9238  (opens in a new tab)
CWE-697  (opens in a new tab)

How to fix?

Upgrade to version 3.0.1 or greater.

When direct dependency update is not possible, use snyk wizard to patch against this vulnerability.

Overview

secure-compare is a node implementation of constant-time comparison algorithm to prevent timing attacks for Node.js. In versions prior to 3.0.1, the compare function made sure that the length of the two arguments is the same, and then mistakenly compared the first argument to itself, meaning that the function would return true for any two arguments of the same length.

CVSS Scores

version 3.1