cve.bz

CVE-2021-23566 nanoid project nanoid: Incorrect Type Conversion or Cast

5.5 mediumExploit referenceEPSS 0.5%Fix available

Medium (5.5) in nanoid project nanoid. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in nanoid 3.1.31.

On this page
The package nanoid from 3.0.0 and 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

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
EPSS
0.5% (unchanged from 0.5% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 42nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-704 Incorrect Type Conversion or Cast
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-23566 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-23566?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-23566?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-23566 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
nanoid_project:nanoidfrom 3.0.0 before 3.1.31

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-qrpm-p2h7-hrv2npmnanoid>=3.0.0 <3.1.313.1.31

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11node-mocha8.2.1+ds1+~cs29.4.27-3+deb11u1DLA-4013-1
Debian11node-postcss8.2.1+~cs5.3.23-8+deb11u1DLA-4003-1
Debian12, 13, 14node-mocha9.1.4+ds1+~cs28.2.8-1DEBIAN-CVE-2021-23566
Debian12, 13, 14node-postcss8.4.5+~cs7.1.51-1DEBIAN-CVE-2021-23566
Ubuntu16.04:LTS, 18.04:LTSnode-mochano fix listedUBUNTU-CVE-2021-23566
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTS and 3 morenode-mocha, node-postcssno fix listedUBUNTU-CVE-2021-23566

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat OpenShift Container Platform 4.11openshift4/ose-thanos-rhel8:v4.11.0-202208020235.p0.gf08da2d.assembly.streamFixed 2022-08-10RHSA-2022:5069
Red Hat OpenShift Data Foundation 4.11 on RHEL8odf4/mcg-core-rhel8:v4.11.0-30Fixed 2022-08-24RHSA-2022:6156
Migration Toolkit for Virtualizationmigration-toolkit-virtualization/mtv-ui-rhel8Fix deferred
OpenShift Developer Tools and ServicesodoNot affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-rhel8Affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/grc-ui-rhel8Affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/kui-web-terminal-rhel8Affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/search-ui-rhel8Affected
Red Hat Ansible Automation Platform 2automation-controllerWill not fix
Red Hat Data Grid 8org.infinispan-infinispan-consoleNot affected
Red Hat JBoss Enterprise Application Platform 7io.smallrye-smallrye-open-api-parentNot affected
Red Hat JBoss Enterprise Application Platform Expansion Packio.smallrye-smallrye-open-api-parentNot affected
Red Hat OpenShift Container Platform 4openshift4/ose-consoleNot affected
Red Hat OpenShift Container Platform 4openshift4/ose-prometheusWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-23566.

References

Check your stackJSON