{"answers":{"affected":"25 open source packages ship an affected version, including zerocopy.","exploited":"There is no known exploitation of GHSA-3mv5-343c-w2qg in the wild and no public exploit code.","fix":"Upgrade zerocopy to a fixed version for your release line: 0.2.9, 0.3.2, 0.4.1 or 0.5.2.","what":"GHSA-3mv5-343c-w2qg is a memory corruption vulnerability in zerocopy, published on 14 Dec 2023."},"fix_prompt":"Check this codebase for GHSA-3mv5-343c-w2qg and fix it if it is affected.\n\nWhat it is: GHSA-3mv5-343c-w2qg is a memory corruption vulnerability in zerocopy, published on 14 Dec 2023. \nExploitation: There is no known exploitation of GHSA-3mv5-343c-w2qg in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- zerocopy (crates.io): affected from 0.2.2; fixed in 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, 0.7.31\n- zerocopy (crates.io): affected from 0.2.2; fixed in 0.2.9\n- zerocopy (crates.io): affected from 0.2.2; fixed in 0.2.9\n- zerocopy (crates.io): affected from 0.2.2; fixed in 0.2.9\n- zerocopy (crates.io): affected from 0.2.2; fixed in 0.2.9\n- zerocopy (crates.io): affected from 0.3.0; fixed in 0.3.2\n- zerocopy (crates.io): affected from 0.3.0; fixed in 0.3.2\n- zerocopy (crates.io): affected from 0.3.0; fixed in 0.3.2\n- zerocopy (crates.io): affected from 0.3.0; fixed in 0.3.2\n- zerocopy (crates.io): affected from 0.4.0; fixed in 0.4.1\n- zerocopy (crates.io): affected from 0.4.0; fixed in 0.4.1\n- zerocopy (crates.io): affected from 0.4.0; fixed in 0.4.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-3mv5-343c-w2qg/ (Markdown: https://insights.sbomify.com/GHSA-3mv5-343c-w2qg/index.md)","id":"GHSA-3mv5-343c-w2qg","markdown":"https://insights.sbomify.com/GHSA-3mv5-343c-w2qg/index.md","name":"GHSA-3mv5-343c-w2qg","record":{"aliases":["GHSA-rjhf-4mh8-9xjq","RUSTSEC-2023-0074"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust zerocopy library","requires_auth":"none","summary":"Unsound Ref methods in the zerocopy library allow safe code to trigger undefined behavior, potentially leading to memory corruption or crashes.","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":"*This advisory is also published as [RUSTSEC-2023-0074](https://rustsec.org/advisories/RUSTSEC-2023-0074.html).*\n\nThe `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound and may allow safe code to exhibit undefined behavior when used with `Ref\u003cB, T\u003e` where `B` is [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or [`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these methods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`.\n\nSee https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.\n\nThe current plan is to yank the affected versions soon. See https://github.com/google/zerocopy/issues/679 for more detail.","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":"Ref methods into_ref, into_mut, into_slice, and into_slice_mut are unsound when used with cell::Ref or cell::RefMut","id":"GHSA-3mv5-343c-w2qg","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2023"},"n_packages":25,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.2.9","0.3.2","0.4.1","0.5.2","0.6.6","0.7.31"],"introduced":["0.2.2","0.3.0","0.4.0","0.5.0","0.6.0","0.7.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"RUSTSEC-2023-0074"},{"ecosystem":"crates.io","fixed":["0.2.9"],"introduced":["0.2.2"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.2.9"],"introduced":["0.2.2"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.2.9"],"introduced":["0.2.2"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.2.9"],"introduced":["0.2.2"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.3.2"],"introduced":["0.3.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.3.2"],"introduced":["0.3.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.3.2"],"introduced":["0.3.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.3.2"],"introduced":["0.3.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.4.1"],"introduced":["0.4.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.4.1"],"introduced":["0.4.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.4.1"],"introduced":["0.4.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.4.1"],"introduced":["0.4.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.5.2"],"introduced":["0.5.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.5.2"],"introduced":["0.5.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.5.2"],"introduced":["0.5.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.5.2"],"introduced":["0.5.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.6.6"],"introduced":["0.6.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.6.6"],"introduced":["0.6.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.6.6"],"introduced":["0.6.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.6.6"],"introduced":["0.6.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.7.31"],"introduced":["0.7.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.7.31"],"introduced":["0.7.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-3mv5-343c-w2qg"},{"ecosystem":"crates.io","fixed":["0.7.31"],"introduced":["0.7.0"],"last_affected":[],"package":"zerocopy","purl":null,"source":"GHSA-rjhf-4mh8-9xjq"},{"ecosystem":"crates.io","fixed":["0.7.31"],"introduced":["0.7.0"],"last_affected":[],"package":"zerocopy","purl":"pkg:cargo/zerocopy","source":"GHSA-rjhf-4mh8-9xjq"}],"products":null,"published":"2023-12-14","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":"Unsound Ref methods in the zerocopy library allow safe code to trigger undefined behavior, potentially leading to memory corruption or crashes.","url":"https://insights.sbomify.com/GHSA-3mv5-343c-w2qg/"}