{"answers":{"affected":"5 open source packages ship an affected version, including nano-id. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-36400 in the wild and no public exploit code.","fix":"Upgrade nano-id to 0.4.0 or later.","what":"CVE-2024-36400 is a critical vulnerability in viz-rs nano-id, published on 4 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-36400 and fix it if it is affected.\n\nWhat it is: CVE-2024-36400 is a critical vulnerability in viz-rs nano-id, published on 4 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-36400 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- nano-id (crates.io): affected all versions; fixed in 0.4.0\n- nano-id (crates.io): affected all versions; fixed in 0.4.0\n- nano-id (crates.io): affected all versions; fixed in 0.4.0\n- nano-id (crates.io): affected all versions; fixed in 0.4.0\n- nano-id (crates.io): affected from 0.0.0-0; fixed in 0.4.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-36400/ (Markdown: https://insights.sbomify.com/CVE-2024-36400/index.md)","id":"CVE-2024-36400","markdown":"https://insights.sbomify.com/CVE-2024-36400/index.md","name":"CVE-2024-36400","record":{"aliases":["GHSA-2hfw-w739-p7x5","GHSA-9hc7-6w9r-wj94","RUSTSEC-2024-0343"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Rust ID generator","requires_auth":"none","summary":"Predictable IDs due to reduced entropy allow attackers to bypass security controls relying on unique identifiers.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"nano_id","vendor":"viz"}],"cvss":{"score":9.4,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","version":"3.1"},"cwes":[{"id":"CWE-331","name":"Insufficient Entropy"}],"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.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"nano-id is unable to generate the correct character set","id":"CVE-2024-36400","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"weak_cryptography","year":"2024"},"n_packages":5,"n_references":2,"next":{"headline":"OSGeo GeoServer GeoTools Eval Injection","id":"CVE-2024-36401"},"packages":[{"ecosystem":"crates.io","fixed":["0.4.0"],"introduced":["0"],"last_affected":[],"package":"nano-id","purl":null,"source":"GHSA-2hfw-w739-p7x5"},{"ecosystem":"crates.io","fixed":["0.4.0"],"introduced":["0"],"last_affected":[],"package":"nano-id","purl":"pkg:cargo/nano-id","source":"GHSA-2hfw-w739-p7x5"},{"ecosystem":"crates.io","fixed":["0.4.0"],"introduced":["0"],"last_affected":[],"package":"nano-id","purl":null,"source":"GHSA-9hc7-6w9r-wj94"},{"ecosystem":"crates.io","fixed":["0.4.0"],"introduced":["0"],"last_affected":[],"package":"nano-id","purl":"pkg:cargo/nano-id","source":"GHSA-9hc7-6w9r-wj94"},{"ecosystem":"crates.io","fixed":["0.4.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"nano-id","purl":"pkg:cargo/nano-id","source":"RUSTSEC-2024-0343"}],"prev":{"headline":"Kanboard affected by Project Takeover via IDOR in ProjectPermissionController","id":"CVE-2024-36399"},"products":["nano-id"],"published":"2024-06-04","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["viz-rs"]},"summary":"Predictable IDs due to reduced entropy allow attackers to bypass security controls relying on unique identifiers.","url":"https://insights.sbomify.com/CVE-2024-36400/"}