{"id":"EUVD-2024-2004","enisaUuid":"e6e6e9c7-c15f-383b-a7ae-59309a4237a0","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.","datePublished":"Jun 4, 2024, 2:11:26 PM","dateUpdated":"Aug 2, 2024, 3:37:05 AM","baseScore":9.4,"baseScoreVersion":"3.1","baseScoreVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","references":"https://github.com/viz-rs/nano-id/security/advisories/GHSA-9hc7-6w9r-wj94\nhttps://github.com/viz-rs/nano-id/commit/a9022772b2f1ce38929b5b81eccc670ac9d3ab23\n","aliases":"CVE-2024-36400\nGHSA-9hc7-6w9r-wj94\n","assigner":"GitHub_M","epss":0.75,"enisaIdProduct":[{"id":"72d36364-a0a4-3a13-a99e-89998d54c7e5","product":{"name":"nano-id","vendor":{"name":"viz-rs"}},"product_version":"\u003c 0.4.0"}],"enisaIdVendor":[{"id":"7a0de492-7c3d-3dfe-a5bc-fed3cd5809af","vendor":{"name":"viz-rs"}}],"enisaIdVulnerability":[{"id":"5c605303-77fa-32be-98e2-56a557252696","vulnerability":{"id":"GHSA-9hc7-6w9r-wj94","description":"Unable to generate the correct character set","datePublished":"Jun 4, 2024, 6:40:34 PM","dateUpdated":"Jun 17, 2024, 3:09:50 PM","baseScore":null,"references":"https://github.com/viz-rs/nano-id/security/advisories/GHSA-9hc7-6w9r-wj94\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-36400\nhttps://github.com/viz-rs/nano-id/commit/a9022772b2f1ce38929b5b81eccc670ac9d3ab23\nhttps://github.com/viz-rs/nano-id\nhttps://rustsec.org/advisories/RUSTSEC-2024-0343.html\n","enisa_id":"EUVD-2024-2004\n","aliases":"CVE-2024-36400\nGHSA-9hc7-6w9r-wj94\n","epss":0.0,"dataProcessed":"Nov 15, 2026, 2:37:19 AM","vulnerabilityProduct":[],"vulnerabilityVendor":[]}},{"id":"ced2adc2-54a0-3dcb-b689-ae2d7f781ee5","vulnerability":{"id":"CVE-2024-36400","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.","datePublished":"Jun 4, 2024, 2:11:26 PM","dateUpdated":"Aug 2, 2024, 3:37:05 AM","status":"PUBLISHED","baseScore":9.4,"baseScoreVersion":"3.1","baseScoreVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","references":"https://github.com/viz-rs/nano-id/security/advisories/GHSA-9hc7-6w9r-wj94\nhttps://github.com/viz-rs/nano-id/commit/a9022772b2f1ce38929b5b81eccc670ac9d3ab23\n","enisa_id":"EUVD-2024-2004\n","assigner":"GitHub_M","epss":0.75,"dataProcessed":"Nov 15, 2026, 7:24:21 AM","vulnerabilityProduct":[{"id":"d499fbe5-e32c-3077-816f-dcb8eaa53b7f","product":{"name":"nano-id","vendor":{"name":"viz-rs"}},"product_version":"\u003c 0.4.0"}],"vulnerabilityVendor":[{"id":"182e340d-3011-3700-a5fd-817cc3d2d8e3","vendor":{"name":"viz-rs"}}]}}],"enisaIdAdvisory":[]}