{"answers":{"affected":"3 open source packages ship an affected version, including fyrox-core.","exploited":"There is no known exploitation of GHSA-h7h7-6mx3-r89v in the wild and no public exploit code.","fix":"Upgrade fyrox-core to a fixed version for your release line: 0.36.0 or 0.36.","what":"GHSA-h7h7-6mx3-r89v is a memory corruption vulnerability in fyrox-core, published on 19 Dec 2024."},"fix_prompt":"Check this codebase for GHSA-h7h7-6mx3-r89v and fix it if it is affected.\n\nWhat it is: GHSA-h7h7-6mx3-r89v is a memory corruption vulnerability in fyrox-core, published on 19 Dec 2024. \nExploitation: There is no known exploitation of GHSA-h7h7-6mx3-r89v in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- fyrox-core (crates.io): affected from 0.0.0-0; fixed in 0.36.0\n- fyrox-core (crates.io): affected from 0.28.1; fixed in 0.36\n- fyrox-core (crates.io): affected from 0.28.1; fixed in 0.36\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-h7h7-6mx3-r89v/ (Markdown: https://insights.sbomify.com/GHSA-h7h7-6mx3-r89v/index.md)","id":"GHSA-h7h7-6mx3-r89v","markdown":"https://insights.sbomify.com/GHSA-h7h7-6mx3-r89v/index.md","name":"GHSA-h7h7-6mx3-r89v","record":{"aliases":["RUSTSEC-2024-0435"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution","data_read"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust game engine library","requires_auth":"none","summary":"Unsound memory transmutation in Fyrox engine library allows attackers to trigger undefined behavior and potential code execution via crafted data.","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":"The library provides a public safe API `transmute_vec_as_bytes`, which incorrectly assumes that any generic type `T` could have stable layout, causing to uninitialized memory exposure if the users pass any types with padding bytes as `T` and cast it to `u8` pointer.  \n\nIn the [issue](https://github.com/FyroxEngine/Fyrox/issues/630), we develop a PoC to show passing struct type to `transmute_vec_as_bytes` could lead to undefined behavior with `Vec::from_raw_parts`.  \n\nThe developers provide a patch by changing trait of `Copy` to `Pod`, which can make sure `T` should be plain data. This was patched in the latest version of [master](https://github.com/FyroxEngine/Fyrox/blob/3f9ad6f9667047dac051b0e97d544e5b38e5ae72/fyrox-core/src/lib.rs#L351-L360) branch, but still not on the latest release (0.28.1).","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 usages of `Vec::from_raw_parts`","id":"GHSA-h7h7-6mx3-r89v","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":["0.36.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"fyrox-core","purl":"pkg:cargo/fyrox-core","source":"RUSTSEC-2024-0435"},{"ecosystem":"crates.io","fixed":["0.36"],"introduced":["0.28.1"],"last_affected":[],"package":"fyrox-core","purl":null,"source":"GHSA-h7h7-6mx3-r89v"},{"ecosystem":"crates.io","fixed":["0.36"],"introduced":["0.28.1"],"last_affected":[],"package":"fyrox-core","purl":"pkg:cargo/fyrox-core","source":"GHSA-h7h7-6mx3-r89v"}],"products":null,"published":"2024-12-19","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 memory transmutation in Fyrox engine library allows attackers to trigger undefined behavior and potential code execution via crafted data.","url":"https://insights.sbomify.com/GHSA-h7h7-6mx3-r89v/"}