{"cve":"CVE-2024-36400","nvd":{"published":"2024-06-04T15:15:46.980","modified":"2026-06-17T07:36:38.703","status":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-331"],"references":["https://github.com/viz-rs/nano-id/commit/a9022772b2f1ce38929b5b81eccc670ac9d3ab23","https://github.com/viz-rs/nano-id/security/advisories/GHSA-9hc7-6w9r-wj94","https://github.com/viz-rs/nano-id/commit/a9022772b2f1ce38929b5b81eccc670ac9d3ab23","https://github.com/viz-rs/nano-id/security/advisories/GHSA-9hc7-6w9r-wj94"],"products":["viz:nano_id"],"source":"nvd","synced_at":"2026-10-19T21:51:20.603330631+00:00"},"epss":{"cve":"CVE-2024-36400","score":0.00754,"percentile":0.55098,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-9hc7-6w9r-wj94","url":"https://osv.dev/vulnerability/GHSA-9hc7-6w9r-wj94","summary":"Unable to generate the correct character set","modified":"2026-09-10T03:50:15.085122155Z","packages":[{"ecosystem":"crates.io","name":"nano-id","purl":"pkg:cargo/nano-id","ranges":["<0.4.0"],"fixed":["0.4.0"]}]},{"id":"RUSTSEC-2024-0343","url":"https://osv.dev/vulnerability/RUSTSEC-2024-0343","summary":"Reduced entropy due to inadequate character set usage","modified":"2024-06-15T13:27:23.912492Z","packages":[{"ecosystem":"crates.io","name":"nano-id","purl":"pkg:cargo/nano-id","ranges":[">=0.0.0-0 <0.4.0"],"fixed":["0.4.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}