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

12 affected componentsFixes available
npm/nanoid/nanoid<5.1.16
Nanoid Project Nanoid Node.js<3.3.16
Nanoid Project Nanoid Node.js>=4.0.0<5.1.16
debian/node-mocha
10.1.0+ds1+~cs29.3.1-110.7.2+ds1+~cs33.1.11-212.0.3+~cs20.0.13-3
debian/node-postcss<=8.4.20+~cs8.0.23-1+deb12u1, <=8.4.49+~cs9.2.32-1
8.5.31+~cs10.2.26-1
debian/node-mocha<9.1.4+ds1+~cs28.2.8-1
9.1.4+ds1+~cs28.2.8-1
debian/node-mocha<9.1.4+ds1+~cs28.2.8-1
9.1.4+ds1+~cs28.2.8-1
debian/node-mocha<9.1.4+ds1+~cs28.2.8-1
9.1.4+ds1+~cs28.2.8-1
debian/node-postcss*
debian/node-postcss*
debian/node-postcss<8.5.15+~cs9.3.39-1
8.5.15+~cs9.3.39-1
IBM API Connect V12 OnPrem<=v12.1.0.0 - v12.1.1.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/node-mocha to a version that resolves this vulnerability.

    Fixed in 9.1.4+ds1+~cs28.2.8-1
  2. Upgrade

    Upgrade debian/node-postcss to a version that resolves this vulnerability.

    Fixed in 8.5.15+~cs9.3.39-1
  3. Upgrade

    Upgrade debian/node-mocha to a version that resolves this vulnerability.

    Fixed in 10.1.0+ds1+~cs29.3.1-1Fixed in 10.7.2+ds1+~cs33.1.11-2Fixed in 12.0.3+~cs20.0.13-3
  4. Upgrade

    Upgrade debian/node-postcss to a version that resolves this vulnerability.

    Fixed in 8.5.31+~cs10.2.26-1

Event History

Jul 29, 2026
CVE Published
via MITRE·01:32 PM
Data Sourced
via MITRE·01:32 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·02:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·02:16 PM
Affected Software
Oct 8, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

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