Skip to content
Fencer Vulns
medium 4.0

CVE-2021-23566 json

Information Exposure

published 2022-01-14 4 y ago modified 2026-06-17 4 mo ago also GHSA-qrpm-p2h7-hrv2 , EUVD-2022-0677

cvss
4.0
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.5%
EPSS 0.5% chance of exploitation in 30 days, percentile 41%
public exploits
0
none known

Summary

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.

Patch / fix

  • npm nanoid 3.1.31
  • n/a nanoid 3.1.31
  • node-mocha Debian 14, Debian 13, Debian 12 9.1.4+ds1+~cs28.2.8-1
  • node-postcss Debian 14, Debian 13, Debian 12 8.4.5+~cs7.1.51-1

debian advisories DEBIAN-CVE-2021-23566

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-23566 updated cvss 5.5

nanoid: Information disclosure via valueOf() function

  • Red Hat Migration Toolkit for Virtualization migration-toolkit-virtualization/mtv-ui-rhel8
    affected: no fix available “Fix deferred”
  • Red Hat Advanced Cluster Management for Kubernetes 2 openshift4/ose-console, rhacm2/search-ui-rhel8, rhtas/rekor-search-ui-rhel9, rhacm2/kui-web-terminal-rhel8
    affected: no fix available
  • Red Hat Ansible Automation Platform 2 automation-controller Red Hat OpenShift Container Platform 4 openshift4/ose-prometheus
    affected: no fix planned “Will not fix”
  • Red Hat OpenShift Container Platform 4.11 openshift4/ose-thanos-rhel8 v4.11.0-202208020235.p0.gf08da2d.assembly.stream
    fixed: vendor fix RHSA-2022:5069
  • Red Hat RHODF 4.11 for RHEL 8 odf4/mcg-core-rhel8 v4.11.0-30
    fixed: vendor fix RHSA-2022:6156
  • Red Hat OpenShift Developer Tools and Services odo Red Hat Data Grid 8 org.infinispan-infinispan-console Red Hat JBoss Enterprise Application Platform 7 io.smallrye-smallrye-open-api-parent Red Hat JBoss Enterprise Application Platform Expansion Pack io.smallrye-smallrye-open-api-parent Red Hat OpenShift Container Platform 4 openshift4/ose-console Red Hat OpenShift Container Platform 4.11 openshift4/ose-cli v4.11.0-202208020706.p0.g7075089.assembly.stream, openshift4/ose-pod v4.11.0-202208020235.p0.g9546431.assembly.stream, openshift4/ose-etcd v4.11.0-202208020235.p0.g80cc14e.assembly.stream, openshift4/ose-tests v4.11.0-202208020706.p0.gb860532.assembly.stream, openshift4/ose-console v4.11.0-202208021257.p0.ge0d49a2.assembly.stream, openshift4/ose-coredns v4.11.0-202208020235.p0.g7fe212f.assembly.stream, +175 more
    +1 more products
    Red Hat RHODF 4.11 for RHEL 8 odf4/cephcsi-rhel8 v4.11.0-45, odf4/odf-console-rhel8 v4.11.0-51, odf4/odf-topolvm-rhel8 v4.11.0-24, odf4/mcg-rhel8-operator v4.11.0-28, odf4/ocs-rhel8-operator v4.11.0-67, odf4/odf-rhel8-operator v4.11.0-27, +19 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.47% chance of exploitation in the next 30 days, higher than 41% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/ai/nanoid/pull/328 referenced PoC, tagged "exploit" by a source, unverified
  • snyk.io https://snyk.io/vuln/SNYK-JS-NANOID-2332193 referenced PoC, tagged "exploit" by a source, unverified
  • snyk.io https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2332550 referenced PoC, tagged "exploit" by a source, unverified
  • gist.github.com https://gist.github.com/artalar/bc6d1eb9a3477d15d2772e876169a444 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 4.0 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P
CNA 3.1 4.0 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
NVD 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD 2.0 2.1 AV:L/AC:L/Au:N/C:P/I:N/A:N
GitHub 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Affected packages

ecosystem package affected fixed in
npm nanoid
>=3.0.0, <3.1.31
3.1.31

Affected products

  • n/a nanoid

Classification

Weakness
  • CWE-704 Incorrect Type Conversion or Cast
  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.