{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2024-36400","published":"2024-06-04T15:15:46.980000Z","last_modified":"2026-06-17T07:36:38.703000Z","status":"Modified","cvss":{"version":"3.1","score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"nvd@nist.gov","primary":true},"auth":false,"cwes":["CWE-331"],"cpes":[{"criteria":"cpe:2.3:a:viz:nano_id:*:*:*:*:*:rust:*:*","part":"a","vendor":"viz","product":"nano_id","version_end_excluding":"0.4.0"}],"cpes_truncated":false,"vendors":["viz"],"products":["viz/nano_id"],"ssvc":{"exploitation":"none","automatable":"yes","technical_impact":"total"},"epss":{"score":0.01063,"percentile":0.64089,"date":"2026-11-30","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-9hc7-6w9r-wj94","ecosystem":"crates.io","name":"nano-id","purl":"pkg:cargo/nano-id","ranges":[{"introduced":"0","fixed":"0.4.0"}],"versions":[],"versions_truncated":false},{"advisory":"RUSTSEC-2024-0343","ecosystem":"crates.io","name":"nano-id","purl":"pkg:cargo/nano-id","ranges":[{"introduced":"0.0.0-0","fixed":"0.4.0"}],"versions":[],"versions_truncated":false}],"severity":"critical","priority_score":74,"links":{"html_es":"/es/cve/CVE-2024-36400/","html_en":"/en/cve/CVE-2024-36400/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-36400","cve_org":"https://www.cve.org/CVERecord?id=CVE-2024-36400"},"untrusted":{"vendor_name":"Viz","product_name":"Nano Id","desc_en":"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":[{"untrusted_vendor":"viz-rs","untrusted_product":"nano-id","versions":[]}],"references":[{"url":"https://github.com/viz-rs/nano-id/commit/a9022772b2f1ce38929b5b81eccc670ac9d3ab23","tags":["Patch"]},{"url":"https://github.com/viz-rs/nano-id/security/advisories/GHSA-9hc7-6w9r-wj94","tags":["Exploit","Patch","Vendor Advisory"]}]}}