nanoid@3.3.16

A tiny (118 bytes), secure URL-friendly unique string ID generator

  • latest version

    6.0.1

  • latest non vulnerable version

  • first published

    9 years ago

  • latest version published

    8 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the nanoid 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
    Infinite loop

    Affected versions of this package are vulnerable to Infinite loop through the customRandom function in the customRandom implementation. An attacker can hang the calling thread by supplying a size of 0 to customRandom, which causes its ID generation loop to never reach a terminating condition. This breaks any application path that accepts an unvalidated, attacker-controlled size and passes it into customRandom, leaving the process stuck while handling the request.

    How to fix Infinite loop?

    Upgrade nanoid to version 3.3.17, 5.1.6 or higher.

    <3.3.17>=4.0.0 <5.1.6