Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-36400

CRITICAL 9.4EPSS 64%

nano-id is unable to generate the correct character set

Also known as GHSA-2hfw-w739-p7x5, GHSA-9hc7-6w9r-wj94, RUSTSEC-2024-0343

Mitigation

  • Upgrade nano-id to 0.4.0 or later.

Who should check

  • Projects that depend on crates.io package nano-id (< 0.4.0)
  • Anyone running viz-rs nano-id < 0.4.0

Vulnerability facts

Affected
nano-id < 0.4.0
Fixed in
0.4.0
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
9.4 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Privileges required: None
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: Low
EPSS
1.06% chance of exploitation in 30 days (percentile 64, 2026-11-26)
CWE
CWE-331
Published
Modified

Description

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.

Affected and fixed versions

Package / productAffectedFixedSource
crates.io nano-id< 0.4.00.4.0osv
viz-rs nano-id< 0.4.0—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-36400. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-36400.md
Affected: nano-id < 0.4.0
Fixed in: 0.4.0

Steps:
1. Search this machine and project for nano-id (crates.io), viz-rs nano-id: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-36400 being exploited?

There is no confirmed exploitation: CVE-2024-36400 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.06% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-36400?

Critical: CVSS 9.4 (v3.1, scored by CNA). Remote, no login needed.

Which versions are affected by CVE-2024-36400?

nano-id < 0.4.0.

Is there a fix for CVE-2024-36400?

Yes. Fixed in 0.4.0. Upgrade nano-id to 0.4.0 or later.

How do I check if I'm affected by CVE-2024-36400?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors