MediumGHSA-qrpm-p2h7-hrv2CVE-2021-23566

Exposure of Sensitive Information to an Unauthorized Actor in nanoid

Published 21 Jan 2022 · Updated 4 Nov 2025

Affected package

Affected
>=3.0.0 <3.1.31
Fixed in
3.1.31
Update to the fixed version for your release line, for example:npm install nanoid@3.1.31

Details

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.

Is GHSA-qrpm-p2h7-hrv2 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected nanoid, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.