Skip to content

Update npm package nanoid to v5.1.16 [SECURITY] - #420

Open
hash-dependencies[bot] wants to merge 1 commit into
mainfrom
deps/js/npm-nanoid-vulnerability
Open

Update npm package nanoid to v5.1.16 [SECURITY]#420
hash-dependencies[bot] wants to merge 1 commit into
mainfrom
deps/js/npm-nanoid-vulnerability

Conversation

@hash-dependencies

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
nanoid 5.1.75.1.16 age confidence

nanoid: non-secure generators can loop indefinitely with negative size

CVE-2026-67214 / GHSA-28wg-ghj8-5hjv

More information

Details

nanoid (Nano ID) before 5.1.16 contains an infinite loop in the customAlphabet and nanoid functions of its non-secure module (nanoid/non-secure). When these functions are given a negative size, the loop counter is decremented from a negative value and never reaches its termination condition, spinning indefinitely and hanging the calling thread. An application that passes an unvalidated, attacker-controlled negative size to these functions is exposed to a denial-of-service condition.

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

ai/nanoid (nanoid)

v5.1.16

Compare Source

v5.1.15

Compare Source

  • Fixed random pool corruption on big ID sizes.

v5.1.14

Compare Source

  • Fixed npm package size regression.

v5.1.13

Compare Source

  • Fixed npm package size regression.

v5.1.12

Compare Source

  • Moved to npm Provenance and Staged Publishing.

v5.1.11

Compare Source

  • Fixed breaking Nano ID by requesting big ID.

v5.1.10

Compare Source

v5.1.9

Compare Source

  • Fixed npm package size regression.

v5.1.8

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • "before 4am every weekday,every weekend"

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

@hash-dependencies
hash-dependencies Bot enabled auto-merge August 9, 2026 20:10
@cursor

cursor Bot commented Aug 9, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Lockfile-only dependency patch with no app code changes; reduces security risk rather than introducing new behavior.

Overview
Bumps the locked nanoid dependency from 5.1.7 to 5.1.16 in package-lock.json to address CVE-2026-67214 (GHSA-28wg-ghj8-5hjv).

The fix in upstream 5.1.16 stops an infinite loop in nanoid/non-secure when nanoid or customAlphabet receive a negative size, which could otherwise hang the process (DoS) if untrusted input reached those APIs. No application source files change in this PR—only the resolved lockfile version and integrity hash.

Reviewed by Cursor Bugbot for commit 3554538. Bugbot is set up for automated code reviews on this repo. Configure here.

@hash-dependencies
hash-dependencies Bot force-pushed the deps/js/npm-nanoid-vulnerability branch from d436007 to 3554538 Compare August 10, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant