safe-compare@1.1.3 vulnerabilities

Constant-time comparison algorithm to prevent timing attacks.

  • latest version

    1.1.4

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    5 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the safe-compare package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • L
    Timing Attack

    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.

    How to fix Timing Attack?

    Upgrade safe-compare to version 1.1.4 or higher.

    >=1.0.4 <1.1.4