cookie-signature@1.0.1 vulnerabilities

Sign and unsign cookies

  • latest version

    1.2.2

  • latest non vulnerable version

  • first published

    13 years ago

  • latest version published

    11 months ago

  • licenses detected

  • Direct Vulnerabilities

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

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Non-Constant Time String Comparison

    'cookie-signature' is a library for signing cookies.

    Versions before 1.0.4 of the library use the built-in string comparison mechanism, ===, and not a time constant string comparison. As a result, the comparison will fail faster when the first characters in the token are incorrect. An attacker can use this difference to perform a timing attack, essentially allowing them to guess the secret one character at a time.

    You can read more about timing attacks in Node.js on the Snyk blog: https://snyk.io/blog/node-js-timing-attack-ccc-ctf/

    How to fix Non-Constant Time String Comparison?

    Upgrade to 1.0.4 or greater.

    <1.0.4