{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-36400","id":"CVE-2024-36400","title":"nano-id is unable to generate the correct character set","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 sy","descriptionLong":"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.","published":"2024-06-04T14:11:26.945Z","updated":"2026-10-28T02:30:26.760789990Z","reserved":"2024-05-27T15:59:57.030Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","rating":"critical","source":"github.com"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","rating":"critical","source":"OSV"},{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","rating":"critical","source":"GitHub"}],"rating":"critical","products":["viz-rs nano-id"],"affectedProducts":[{"vendor":"viz-rs","product":"nano-id","defaultStatus":null,"versions":[{"version":"< 0.4.0","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"crates.io","name":"nano-id","purl":"pkg:cargo/nano-id","ranges":["<0.4.0",">=0.0.0-0 <0.4.0"],"fixed":["0.4.0"],"advisory":"GHSA-2hfw-w739-p7x5"}],"cwes":["CWE-331"],"aliases":["GHSA-2hfw-w739-p7x5","GHSA-9hc7-6w9r-wj94","RUSTSEC-2024-0343"],"references":[{"url":"https://github.com/viz-rs/nano-id/security/advisories/GHSA-9hc7-6w9r-wj94","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Patch","Vendor Advisory","advisory","web"]},{"url":"https://github.com/viz-rs/nano-id/commit/a9022772b2f1ce38929b5b81eccc670ac9d3ab23","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/36xxx/CVE-2024-36400.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-36400","tags":["advisory"]},{"url":"https://github.com/viz-rs/nano-id","tags":["package"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0343.html","tags":["web","advisory"]},{"url":"https://crates.io/crates/nano-id","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.00754,"epssPercentile":0.55866,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-36400","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-36400","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-36400","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-2hfw-w739-p7x5","ok":true,"note":"GHSA-2hfw-w739-p7x5"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-9hc7-6w9r-wj94","ok":true,"note":"GHSA-9hc7-6w9r-wj94"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-36400","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}