Repository navigation
fix(deps): update dependency nanoid to v5 [security] - #1187
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
2 times, most recently
from
August 13, 2025 17:26
1e7d32f to
78d5755
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
August 19, 2025 13:36
78d5755 to
a627d65
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
August 31, 2025 11:07
a627d65 to
b250d87
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
September 25, 2025 16:33
b250d87 to
3e22b04
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
October 21, 2025 11:15
3e22b04 to
bbc0227
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
November 11, 2025 02:16
bbc0227 to
299109a
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
November 18, 2025 22:59
299109a to
514dd69
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
December 3, 2025 19:10
514dd69 to
7c89228
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
December 31, 2025 16:03
7c89228 to
aadb143
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
January 8, 2026 17:31
aadb143 to
1bbe417
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
January 19, 2026 20:02
1bbe417 to
ff76ec3
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
February 2, 2026 21:53
ff76ec3 to
0242aa2
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
2 times, most recently
from
February 17, 2026 15:46
0aa73b2 to
138fc8d
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
March 5, 2026 19:13
138fc8d to
76d1c2b
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
March 13, 2026 16:49
76d1c2b to
bba6451
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
3 times, most recently
from
April 1, 2026 20:34
a6ab955 to
55b895d
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
April 8, 2026 19:55
55b895d to
83b478f
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
3 times, most recently
from
April 29, 2026 09:51
b9751f1 to
e9afd7a
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
2 times, most recently
from
May 18, 2026 10:45
9c1395d to
e0e5610
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
2 times, most recently
from
June 1, 2026 17:58
b15adee to
40dcd8a
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
June 11, 2026 16:05
40dcd8a to
3606657
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
2 times, most recently
from
July 17, 2026 11:35
4393425 to
a139e01
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
2 times, most recently
from
July 24, 2026 19:35
e63bac1 to
2145212
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
July 30, 2026 21:12
2145212 to
09aa174
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
3 times, most recently
from
August 14, 2026 19:15
2887b05 to
f037859
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
August 26, 2026 18:48
f037859 to
21df561
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
4 times, most recently
from
September 9, 2026 18:53
e9c4ae7 to
dddbe97
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
2 times, most recently
from
September 15, 2026 20:17
efdc45f to
72af62b
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
2 times, most recently
from
October 1, 2026 04:26
4e03184 to
161b52a
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
October 5, 2026 15:39
161b52a to
b7b8a4a
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
October 13, 2026 11:30
b7b8a4a to
1590dc0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.0.0→^5.0.0Predictable results in nanoid generation when given non-integer values
CVE-2024-55565 / GHSA-mwcw-c2x4-8c55
More information
Details
When nanoid is called with a fractional value, there were a number of undesirable effects:
Version 3.3.8 and 5.0.9 are fixed.
Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
nanoid: custom generators can loop indefinitely when size is zero
CVE-2026-67213 / GHSA-2v37-7h3g-55p8
More information
Details
nanoid (Nano ID) before 5.1.6 contains an infinite loop in the customAlphabet and customRandom functions. When these functions are configured with a size of 0, the internal generation loop never satisfies its exit condition and spins indefinitely, hanging the calling thread. An application that passes an unvalidated, attacker-controlled size of 0 to these functions is exposed to a denial-of-service condition.
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
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:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
nanoid: Integer Overflow or Wraparound
CVE-2026-73086 / GHSA-xwg4-73v4-xw9w
More information
Details
Summary
An integer overflow in
nanoid(size)permanently corrupts the process-wide CSPRNG pool, causing all subsequent ID generation to return the deterministic string"uuuuuuuuuuuuuuuuuuuuu". Any application that passes user-influenced values to thesizeparameter loses all randomness guarantees for session tokens, CSRF tokens, and unique identifiers until process restart.Details
nanoid()atindex.js:101coerces thesizeparameter withsize |= 0, which converts it to a signed 32-bit integer. Whensize >= 2^31(e.g.,2147483648), this wraps to-2147483648.The negative value is passed to
fillPool()(index.js:15):Neither branch triggers, so the pool is never refreshed.
poolOffsetbecomes ~-2.1 billion.Subsequent
nanoid()calls execute:pool[negative_index]returnsundefined.undefined & 63evaluates to0.urlAlphabet[0]is'u'. Every ID becomes"uuuuuuuuuuuuuuuuuuuuu".The corruption is persistent — it affects all subsequent calls in the process until ~100 million calls eventually wrap
poolOffsetback to positive, or the process restarts.PoC
Run with:
node --experimental-vm-modules poc.mjsAttack scenario: Any API endpoint that accepts a user-controlled length/size parameter (URL shortener slug length, configurable token size, etc.) and passes it to
nanoid(userInput).Impact
Complete loss of ID unpredictability and uniqueness, process-wide, from a single request.
nanoidin the same processsizeparameter without validationSeverity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
ai/nanoid (nanoid)
v5.1.16Compare Source
v5.1.15Compare Source
v5.1.14Compare Source
v5.1.13Compare Source
v5.1.12Compare Source
v5.1.11Compare Source
v5.1.10Compare Source
v5.1.9Compare Source
v5.1.8Compare Source
cusatomAlphabet75% faster (by @saripovdenis).v5.1.7Compare Source
--versionto CLI (by @mahmoodhamdi).nanoid.jsfor CDN (by @mahmoodhamdi).customRandomtypes (by @oguimbal).v5.1.6Compare Source
customAlphabet.v5.1.5Compare Source
v5.1.4Compare Source
v5.1.3Compare Source
v5.1.2Compare Source
v5.1.1Compare Source
v5.1.0Compare Source
v5.0.9Compare Source
v5.0.8Compare Source
customAlphabetsize (by @kirillgroshkov).v5.0.7Compare Source
v5.0.6Compare Source
v5.0.5Compare Source
v5.0.4Compare Source
v5.0.3Compare Source
v5.0.2Compare Source
webcryptoimport (by Divyansh Singh).v5.0.1Compare Source
v5.0.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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.
This PR was generated by Mend Renovate. View the repository job log.