CVE-2026-67214: nanoid Infinite Loop via Negative Size in non-secure module

Published Jul 29, 2026
·
Updated

nanoid (Nano ID) before 3.3.16 and 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.

Affected Software

3 affected components
npm/nanoid/nanoid<5.1.16
Nanoid Project Nanoid Node.js<3.3.16
Nanoid Project Nanoid Node.js>=5.0.0<5.1.16

Event History

Jul 29, 2026
CVE Published
via MITRE·01:32 PM
Data Sourced
via MITRE·01:32 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-67214?

The severity of CVE-2026-67214 is medium with a score of 5.9.

2

How does CVE-2026-67214 affect nanoid before version 5.1.16?

CVE-2026-67214 causes an infinite loop when the customAlphabet and nanoid functions are provided a negative size in the non-secure module.

3

How can I fix CVE-2026-67214?

To fix CVE-2026-67214, update nanoid to version 5.1.16 or later.

4

What types of applications are vulnerable to CVE-2026-67214?

Any application using nanoid before version 5.1.16 that calls customAlphabet or nanoid with a negative size is vulnerable to CVE-2026-67214.

5

What module is affected by CVE-2026-67214 in nanoid?

CVE-2026-67214 specifically affects the non-secure module of nanoid.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203