nano-id is unable to generate the correct character set
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.
Summary
nano-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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| viz-rs | nano-id | before 0.4.0 | 0.4.0 | Patch available | CNA |
| — | nano-id (crates.io) | before 0.4.0 | 0.4.0 | Patch available | GHSA-9hc7-6w9r-wj94 |
- nano-id Vendorviz-rs Affected before 0.4.0 Fixed in 0.4.0 Patch available CNA
- nano-id (crates.io) Vendor— Affected before 0.4.0 Fixed in 0.4.0 Patch available GHSA-9hc7-6w9r-wj94
Remediation
- Fix · CNA nano-id (viz-rs) Fixed in 0.4.0
- Fix · GHSA-9hc7-6w9r-wj94 nano-id (crates.io) Fixed in 0.4.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-36400
- 2026-10-03 Alias added: GHSA-9hc7-6w9r-wj94
References
Sources
- CVE-2024-36400 · CVE Program
- CVE-2024-36400 · NVD
- FIRST EPSS
- GHSA-9hc7-6w9r-wj94 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences