{"answers":{"affected":"3 open source packages ship an affected version, including whoami.","exploited":"There is no known exploitation of GHSA-w5w5-8vfh-xcjq in the wild and no public exploit code.","fix":"Upgrade whoami to 1.5.0 or later.","what":"GHSA-w5w5-8vfh-xcjq is a memory corruption vulnerability in whoami, published on 28 Feb 2024."},"fix_prompt":"Check this codebase for GHSA-w5w5-8vfh-xcjq and fix it if it is affected.\n\nWhat it is: GHSA-w5w5-8vfh-xcjq is a memory corruption vulnerability in whoami, published on 28 Feb 2024. \nExploitation: There is no known exploitation of GHSA-w5w5-8vfh-xcjq in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- whoami (crates.io): affected from 0.5.3; fixed in 1.5.0\n- whoami (crates.io): affected from 0.5.3; fixed in 1.5.0\n- whoami (crates.io): affected from 0.5.3; fixed in 1.5.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/GHSA-w5w5-8vfh-xcjq/ (Markdown: https://insights.sbomify.com/GHSA-w5w5-8vfh-xcjq/index.md)","id":"GHSA-w5w5-8vfh-xcjq","markdown":"https://insights.sbomify.com/GHSA-w5w5-8vfh-xcjq/index.md","name":"GHSA-w5w5-8vfh-xcjq","record":{"aliases":["RUSTSEC-2024-0020"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service","code_execution"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust whoami crate","requires_auth":"none","summary":"A stack buffer overflow in the whoami Rust crate allows attackers to cause denial of service or potentially execute code on Unix platforms.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"With versions of the whoami crate \u003e= 0.5.3 and \u003c 1.5.0, calling any of these functions leads to an immediate stack buffer overflow on illumos and Solaris:\n\n- `whoami::username`\n- `whoami::realname`\n- `whoami::username_os`\n- `whoami::realname_os`\n\nWith versions of the whoami crate \u003e= 0.5.3 and \u003c 1.0.1, calling any of the above functions also leads to a stack buffer overflow on these platforms:\n\n- Bitrig\n- DragonFlyBSD\n- FreeBSD\n- NetBSD\n- OpenBSD\n\nThis occurs because of an incorrect definition of the `passwd` struct on those platforms.\n\nAs a result of this issue, denial of service and data corruption have both been observed in the wild. The issue is possibly exploitable as well.\n\nThis vulnerability also affects other Unix platforms that aren't Linux or macOS.\n\nThis issue has been addressed in whoami 1.5.0.\n\nFor more information, see [this GitHub issue](https://github.com/ardaku/whoami/issues/91).","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"whoami stack buffer overflow on several Unix platforms","id":"GHSA-w5w5-8vfh-xcjq","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2024"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["1.5.0"],"introduced":["0.5.3"],"last_affected":[],"package":"whoami","purl":null,"source":"GHSA-w5w5-8vfh-xcjq"},{"ecosystem":"crates.io","fixed":["1.5.0"],"introduced":["0.5.3"],"last_affected":[],"package":"whoami","purl":"pkg:cargo/whoami","source":"GHSA-w5w5-8vfh-xcjq"},{"ecosystem":"crates.io","fixed":["1.5.0"],"introduced":["0.5.3"],"last_affected":[],"package":"whoami","purl":"pkg:cargo/whoami","source":"RUSTSEC-2024-0020"}],"products":null,"published":"2024-02-28","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A stack buffer overflow in the whoami Rust crate allows attackers to cause denial of service or potentially execute code on Unix platforms.","url":"https://insights.sbomify.com/GHSA-w5w5-8vfh-xcjq/"}