nano-id is a unique string ID generator for Rust. Affected versions of the nano-id crate incorrectly…
Historical advisory recorded 25 Oct 2026 00:17:15 UTC. Read the latest advisory.
nvd · CVE-2024-36400
Publishednano-id is a unique string ID generator for Rust. Affected versions of the nano-id crate incorrectly generated IDs using a reduced character set in the `nano_id::base62` and `nano_id::base58` functions. Specifically, the `base62` function used a character set of 32 symbols instead of the intended 62 symbols, and the `base58` function used a character set of 16 symbols instead of the intended 58 symbols. Additionally, the `nano_id::gen` macro is also affected when a custom character set that is not a power of 2 in size is specified. It should be noted that `nano_id::base64` is not affected by this vulnerability. This can result in a significant reduction in entropy, making the generated IDs predictable and vulnerable to brute-force attacks when the IDs are used in security-sensitive contexts such as session tokens or unique identifiers. The vulnerability is fixed in 0.4.0.
Read the publisher's advisoryAffected versions, risk and source history
nvd · CVE-2024-36400
PublishedNVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Modified
Weakness classifications: CWE-331
Original publisher date fields
published: 2024-06-04T15:15:46.980
lastModified: 2026-06-17T07:36:38.703
1 source CPE criteria · context only
- cpe:2.3:a:viz:nano_id:*:*:*:*:*:rust:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.
Original source record · Cite this exact observation · Complete original publisher JSON