Repository navigation
fix(deps): update dependency nanoid to v5.1.16 [security] - #591
renovate[bot] wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
#1454 Bundle Size — 2.56MiB (0%).2c8d1dd(current) vs 3b6dffc main#1453(baseline) Warning Bundle contains 4 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
|
| Current #1454 |
Baseline #1453 |
|
|---|---|---|
2.24MiB |
2.24MiB |
|
213.87KiB |
213.87KiB |
|
89.92KiB |
89.92KiB |
|
15.35KiB |
15.35KiB |
|
1.73KiB |
1.73KiB |
Bundle analysis report Branch refs/pull/591/merge Project dashboard
Generated by RelativeCI Documentation Report issue
c5775fe to
48ab56c
Compare
48ab56c to
fb293a4
Compare
fb293a4 to
968a568
Compare
968a568 to
552666d
Compare
552666d to
fb0e86f
Compare
fb0e86f to
f5d1a28
Compare
f5d1a28 to
4e35ebc
Compare
4e35ebc to
55f723b
Compare
55f723b to
237a351
Compare
237a351 to
b0cf8aa
Compare
b0cf8aa to
fcdbba5
Compare
fcdbba5 to
f0a1b50
Compare
f0a1b50 to
baea17c
Compare
baea17c to
917b37d
Compare
This PR contains the following updates:
5.0.7→5.1.16Predictable 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).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.