{"answers":{"affected":"5 open source packages ship an affected version, including ferris-says.","exploited":"There is no known exploitation of GHSA-v363-rrf2-5fmj in the wild and no public exploit code.","fix":"Upgrade ferris-says to 0.3.1 or later.","what":"GHSA-v363-rrf2-5fmj is a memory corruption vulnerability in ferris-says, published on 13 Jan 2024."},"fix_prompt":"Check this codebase for GHSA-v363-rrf2-5fmj and fix it if it is affected.\n\nWhat it is: GHSA-v363-rrf2-5fmj is a memory corruption vulnerability in ferris-says, published on 13 Jan 2024. \nExploitation: There is no known exploitation of GHSA-v363-rrf2-5fmj in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- ferris-says (crates.io): affected from 0.1.2 up to 0.2.1; no fix listed\n- ferris-says (crates.io): affected from 0.1.2 up to 0.2.1; no fix listed\n- ferris-says (crates.io): affected from 0.1.3-0; fixed in 0.3.1\n- ferris-says (crates.io): affected from 0.3.0; fixed in 0.3.1\n- ferris-says (crates.io): affected from 0.3.0; fixed in 0.3.1\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-v363-rrf2-5fmj/ (Markdown: https://insights.sbomify.com/GHSA-v363-rrf2-5fmj/index.md)","id":"GHSA-v363-rrf2-5fmj","markdown":"https://insights.sbomify.com/GHSA-v363-rrf2-5fmj/index.md","name":"GHSA-v363-rrf2-5fmj","record":{"aliases":["RUSTSEC-2024-0001"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust text formatting library","requires_auth":"none","summary":"An attacker can cause undefined behavior, potentially leading to crashes or code execution, by providing invalid UTF-8 bytes to the ferris-says library.","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":"Affected versions receive a `\u0026[u8]` from the caller through a safe API, and pass\nit directly to the unsafe `str::from_utf8_unchecked` function.\n\nThe behavior of `ferris_says::say` is undefined if the bytes from the caller\ndon't happen to be valid UTF-8.\n\nThe flaw was corrected in [ferris-says#21] by using the safe `str::from_utf8`\ninstead, and returning an error on invalid input. However this fix has not yet\nbeen published to crates.io as a patch version for 0.2.\n\nSeparately, [ferris-says#32] has introduced a different API for version 0.3\nwhich accepts input as `\u0026str` rather than `\u0026[u8]`, so is unaffected by this bug.\n\n[ferris-says#21]: https://github.com/rust-lang/ferris-says/pull/21\n[ferris-says#32]: https://github.com/rust-lang/ferris-says/pull/32","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":"Unsound use of str::from_utf8_unchecked on bytes which are not UTF-8","id":"GHSA-v363-rrf2-5fmj","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2024"},"n_packages":5,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":[],"introduced":["0.1.2"],"last_affected":["0.2.1"],"package":"ferris-says","purl":null,"source":"GHSA-v363-rrf2-5fmj"},{"ecosystem":"crates.io","fixed":[],"introduced":["0.1.2"],"last_affected":["0.2.1"],"package":"ferris-says","purl":"pkg:cargo/ferris-says","source":"GHSA-v363-rrf2-5fmj"},{"ecosystem":"crates.io","fixed":["0.3.1"],"introduced":["0.1.3-0"],"last_affected":[],"package":"ferris-says","purl":"pkg:cargo/ferris-says","source":"RUSTSEC-2024-0001"},{"ecosystem":"crates.io","fixed":["0.3.1"],"introduced":["0.3.0"],"last_affected":[],"package":"ferris-says","purl":null,"source":"GHSA-v363-rrf2-5fmj"},{"ecosystem":"crates.io","fixed":["0.3.1"],"introduced":["0.3.0"],"last_affected":[],"package":"ferris-says","purl":"pkg:cargo/ferris-says","source":"GHSA-v363-rrf2-5fmj"}],"products":null,"published":"2024-01-13","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":"An attacker can cause undefined behavior, potentially leading to crashes or code execution, by providing invalid UTF-8 bytes to the ferris-says library.","url":"https://insights.sbomify.com/GHSA-v363-rrf2-5fmj/"}