{"answers":{"affected":"3 open source packages ship an affected version, including eyre.","exploited":"There is no known exploitation of GHSA-4v52-7q2x-v4xj in the wild and no public exploit code.","fix":"Upgrade eyre to 0.6.12 or later.","what":"GHSA-4v52-7q2x-v4xj is a memory corruption vulnerability in eyre, published on 5 Mar 2024."},"fix_prompt":"Check this codebase for GHSA-4v52-7q2x-v4xj and fix it if it is affected.\n\nWhat it is: GHSA-4v52-7q2x-v4xj is a memory corruption vulnerability in eyre, published on 5 Mar 2024. \nExploitation: There is no known exploitation of GHSA-4v52-7q2x-v4xj in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- eyre (crates.io): affected from 0.6.9; fixed in 0.6.12\n- eyre (crates.io): affected from 0.6.9; fixed in 0.6.12\n- eyre (crates.io): affected from 0.6.9; fixed in 0.6.12\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-4v52-7q2x-v4xj/ (Markdown: https://insights.sbomify.com/GHSA-4v52-7q2x-v4xj/index.md)","id":"GHSA-4v52-7q2x-v4xj","markdown":"https://insights.sbomify.com/GHSA-4v52-7q2x-v4xj/index.md","name":"GHSA-4v52-7q2x-v4xj","record":{"aliases":["RUSTSEC-2024-0021"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust error handling library","requires_auth":"none","summary":"Incorrect type handling during error downcasting causes memory corruption or leaks, potentially leading to code execution or crashes in applications using this Rust 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":"In affected versions, after a `Report` is constructed using `wrap_err` or\n`wrap_err_with` to attach a message of type `D` onto an error of type `E`, then\nusing `downcast` to recover ownership of either the value of type `D` or the\nvalue of type `E`, one of two things can go wrong:\n\n- If downcasting to `E`, there remains a value of type `D` to be dropped. It is\n  incorrectly \"dropped\" by running `E`'s drop behavior, rather than `D`'s. For\n  example if `D` is `\u0026str` and `E` is `std::io::Error`, there would be a call of\n  `std::io::Error::drop` in which the reference received by the `Drop` impl does\n  not refer to a valid value of type `std::io::Error`, but instead to `\u0026str`.\n\n- If downcasting to `D`, there remains a value of type `E` to be dropped. When\n  `D` and `E` do not happen to be the same size, `E`'s drop behavior is\n  incorrectly executed in the wrong location. The reference received by the\n  `Drop` impl may point left or right of the real `E` value that is meant to be\n  getting dropped.\n\nIn both cases, when the `Report` contains an error `E` that has nontrivial drop\nbehavior, the most likely outcome is memory corruption.\n\nWhen the `Report` contains an error `E` that has trivial drop behavior (for\nexample a `Utf8Error`) but where `D` has nontrivial drop behavior (such as\n`String`), the most likely outcome is that downcasting to `E` would leak `D`.","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":"Parts of Report are dropped as the wrong type during downcast","id":"GHSA-4v52-7q2x-v4xj","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.6.12"],"introduced":["0.6.9"],"last_affected":[],"package":"eyre","purl":null,"source":"GHSA-4v52-7q2x-v4xj"},{"ecosystem":"crates.io","fixed":["0.6.12"],"introduced":["0.6.9"],"last_affected":[],"package":"eyre","purl":"pkg:cargo/eyre","source":"GHSA-4v52-7q2x-v4xj"},{"ecosystem":"crates.io","fixed":["0.6.12"],"introduced":["0.6.9"],"last_affected":[],"package":"eyre","purl":"pkg:cargo/eyre","source":"RUSTSEC-2024-0021"}],"products":null,"published":"2024-03-05","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":"Incorrect type handling during error downcasting causes memory corruption or leaks, potentially leading to code execution or crashes in applications using this Rust library.","url":"https://insights.sbomify.com/GHSA-4v52-7q2x-v4xj/"}