NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

Exposure of Sensitive Information to an Unauthorized Actor in nanoidGHSA-qrpm-p2h7-hrv2

MEDIUMFix: ai/nanoid#328

GHSA-qrpm-p2h7-hrv2 is a medium-severity (CVSS 5.5) CWE-704 vulnerability in nanoid. 4 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for nanoid — see the affected versions and patch details below.

Also known asCVE-2021-23566
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
4 known
Exploitation data as of Nov 26, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.5%probability of exploitation in next 30 days
Lower Risk+0.03%
Lower risk than most CVEs33th percentile — riskier than 33% of all scored CVEsHighest risk
0.00%0.32%0.65%0.97%0.0%0.5%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

18Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
nanoidnpm
380.1Mdownloads / week

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmnanoid≥ 3.0.0&&< 3.1.313.1.31npm install nanoid@3.1.31

Affected Products

1 product · 1 configurations
Application
nanoidnanoid_project
≥ 3.0.0 && < 3.1.31
range
Exploits & PoCs
4

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nanoid, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update nanoid to 3.1.31 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qrpm-p2h7-hrv2 is resolved across your whole dependency graph.

  3. Workarounds

    Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate
ProductFixed inAdvisory
Red Hat Advanced Cluster Management for Kubernetes 2.4 for RHEL 8rhacm2/console-rhel8:v2.4.3-13RHSA-2022:1476
Red Hat OpenShift Container Platform 4.11openshift4/ose-thanos-rhel8:v4.11.0-202208020235.p0.gf08da2d.assembly.streamRHSA-2022:5069
Red Hat OpenShift Data Foundation 4.11 on RHEL8odf4/mcg-core-rhel8:v4.11.0-30RHSA-2022:6156

Frequently Asked Questions

The package nanoid from 3.0.0, before 3.1.31, are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.
O3 Security · Impact-Aware SCA

Is GHSA-qrpm-p2h7-hrv2 in your dependencies?

Find it across npm, including transitive dependencies.

Exposure of Sensitive Information to an Unauthorized…