chore(deps): update dependency nanoid to v3.3.12 [security] - #53
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency nanoid to v3.3.12 [security]#53renovate[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
from
November 11, 2025 01:12
1496a78 to
d72a33d
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
November 18, 2025 22:55
d72a33d to
9510bbf
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
March 30, 2026 21:16
9510bbf to
4f24bed
Compare
renovate
Bot
force-pushed
the
renovate/npm-nanoid-vulnerability
branch
from
September 5, 2026 02:39
4f24bed to
488d325
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:
3.1.10→3.3.12Exposure of Sensitive Information to an Unauthorized Actor in nanoid
CVE-2021-23566 / GHSA-qrpm-p2h7-hrv2
More information
Details
The package nanoid from 3.0.0, before 3.1.31, are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.
Severity
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A: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)
v3.3.12Compare Source
v3.3.11Compare Source
v3.3.10Compare Source
v3.3.9Compare Source
v3.3.8Compare Source
v3.3.7Compare Source
node16TypeScript support (by Saadi Myftija).v3.3.6Compare Source
v3.3.5Compare Source
v3.3.4Compare Source
--helpin CLI (by @Lete114).v3.3.3Compare Source
v3.3.2Compare Source
enhanced-resolvesupport.v3.3.1Compare Source
v3.3.0Compare Source
v3.2.0Compare Source
v3.1.32Compare Source
asyncexports size (by Artyom Arutyunyan).v3.1.31Compare Source
size(by Artyom Arutyunyan).v3.1.30Compare Source
brotlicompression (by Anton Khlynovskiy).v3.1.29Compare Source
v3.1.28Compare Source
v3.1.27Compare Source
dependenciesfrom development tools.v3.1.26Compare Source
v3.1.25Compare Source
browserifysupport.v3.1.24Compare Source
browserifysupport (by Artur Paikin).v3.1.23Compare Source
esbuildsupport.v3.1.22Compare Source
defaultandbrowser.defaulttopackage.exports.v3.1.21Compare Source
v3.1.20Compare Source
v3.1.19Compare Source
customAlphabetsize (by Enrico Scherlies).v3.1.18Compare Source
package.exports.v3.1.17Compare Source
process.v3.1.16Compare Source
v3.1.15Compare Source
package.typespath.v3.1.14Compare Source
package.types.v3.1.13Compare Source
randomFillSyncregression fromengines.node.v3.1.12Compare Source
v3.1.11Compare Source
customAlphabetin browser (by @LoneRifle).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.