Skip to content

chore(deps): update dependency nanoid to v5.1.16 [security] - #142

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-nanoid-vulnerability
Open

chore(deps): update dependency nanoid to v5.1.16 [security]#142
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-nanoid-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
nanoid 5.0.45.1.16 age confidence

Predictable 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:

  1. in browser and non-secure, the code infinite loops on while (size--)
  2. in node, the value of poolOffset becomes fractional, causing calls to nanoid to return zeroes until the pool is next filled
  3. if the first call in node is a fractional argument, the initial buffer allocation fails with an error

Version 3.3.8 and 5.0.9 are fixed.

Severity

  • CVSS Score: 4.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

References

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 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).


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

v5.1.7

Compare Source

v5.1.6

Compare Source

  • Fixed infinite loop on 0 size for customAlphabet.

v5.1.5

Compare Source

  • Fixed latest version on npm after 3.x release.

v5.1.4

Compare Source

  • Fixed latest version on npm after 3.x release.

v5.1.3

Compare Source

v5.1.2

Compare Source

  • Fixed module docs.

v5.1.1

Compare Source

  • Fixed breaking Nano ID by requesting big ID.

v5.1.0

Compare Source

v5.0.9

Compare Source

  • Fixed a way to break Nano ID by passing non-integer size (by @​myndzi).

v5.0.8

Compare Source

v5.0.7

Compare Source

v5.0.6

Compare Source

  • Fixed React Native support.

v5.0.5

Compare Source

  • Make browser’s version faster by increasing size a little (by Samuel Elgozi).

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


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

This PR was generated by Mend Renovate. View the repository job log.

@height

height Bot commented Dec 10, 2024

Copy link
Copy Markdown

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@renovate renovate Bot changed the title fix(deps): update dependency nanoid to v5.0.9 [security] chore(deps): update dependency nanoid to v5.0.9 [security] Sep 25, 2025
@renovate renovate Bot changed the title chore(deps): update dependency nanoid to v5.0.9 [security] chore(deps): update dependency nanoid to v5.0.9 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate
renovate Bot deleted the renovate/npm-nanoid-vulnerability branch March 27, 2026 05:28
@renovate renovate Bot changed the title chore(deps): update dependency nanoid to v5.0.9 [security] - autoclosed chore(deps): update dependency nanoid to v5.0.9 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-nanoid-vulnerability branch 2 times, most recently from f456c23 to 1e69bf6 Compare March 30, 2026 17:34
@renovate renovate Bot changed the title chore(deps): update dependency nanoid to v5.0.9 [security] chore(deps): update dependency nanoid to v5.0.9 [security] - autoclosed Jul 22, 2026
@renovate renovate Bot closed this Jul 22, 2026
@renovate renovate Bot changed the title chore(deps): update dependency nanoid to v5.0.9 [security] - autoclosed chore(deps): update dependency nanoid to v5.0.9 [security] Jul 22, 2026
@renovate renovate Bot reopened this Jul 22, 2026
@renovate
renovate Bot force-pushed the renovate/npm-nanoid-vulnerability branch 2 times, most recently from 1e69bf6 to fe023ec Compare July 22, 2026 02:50
@renovate renovate Bot changed the title chore(deps): update dependency nanoid to v5.0.9 [security] chore(deps): update dependency nanoid to v5.1.16 [security] Aug 9, 2026
@renovate
renovate Bot force-pushed the renovate/npm-nanoid-vulnerability branch from fe023ec to f01d9f4 Compare August 9, 2026 16:29
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.

0 participants