generate-pincode@2.0.0 vulnerabilities

Generate random pincode

  • latest version

    6.0.0

  • latest non vulnerable version

  • first published

    11 years ago

  • latest version published

    4 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the generate-pincode 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
    • H
    Insecure Randomness

    generate-pincode is a module for generating random pincodes.

    Affected versions of the package are vulnerable to Insecure Randomness. It used the cryptographically insecure Math.random() in order to shuffle the pin code array, which can produce predictable values and should not be used in security-sensitive context.

    Typically, Math.random() is sufficient for most uses but should be avoided for cryptographic use, where the ability to predict the outcome gives the attacker a significant advantage.

    How to fix Insecure Randomness?

    Upgrade generate-pincode to version 5.0.2 or higher.

    <5.0.2