{"answers":{"affected":"3 open source packages ship an affected version, including array-macro.","exploited":"There is no known exploitation of GHSA-7v4j-8wvr-v55r in the wild and no public exploit code.","fix":"Upgrade array-macro to 2.1.2 or later.","what":"GHSA-7v4j-8wvr-v55r is a memory corruption vulnerability in array-macro, published on 27 Apr 2022."},"fix_prompt":"Check this codebase for GHSA-7v4j-8wvr-v55r and fix it if it is affected.\n\nWhat it is: GHSA-7v4j-8wvr-v55r is a memory corruption vulnerability in array-macro, published on 27 Apr 2022. \nExploitation: There is no known exploitation of GHSA-7v4j-8wvr-v55r in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- array-macro (crates.io): affected from 2.1.0; fixed in 2.1.2\n- array-macro (crates.io): affected from 2.1.0; fixed in 2.1.2\n- array-macro (crates.io): affected from 2.1.0; fixed in 2.1.2\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-7v4j-8wvr-v55r/ (Markdown: https://insights.sbomify.com/GHSA-7v4j-8wvr-v55r/index.md)","id":"GHSA-7v4j-8wvr-v55r","markdown":"https://insights.sbomify.com/GHSA-7v4j-8wvr-v55r/index.md","name":"GHSA-7v4j-8wvr-v55r","record":{"aliases":["RUSTSEC-2022-0017"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust array macro","requires_auth":"none","summary":"Unsound array initialization via impure constants allows arbitrary code execution in Rust applications using the affected macro.","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 of this crate did substitute the array length provided by an user at compile-time multiple times.\n\nWhen an impure constant expression is passed as an array length (such as a result of an impure procedural macro), this can result in the initialization of an array with uninitialized types, which in turn can allow an attacker to execute arbitrary code.\n\nThe flaw was corrected in commit [d5b63f72](https://gitlab.com/KonradBorowski/array-macro/-/commit/d5b63f72090f3809c21ac28f9cfd84f12559bf7d) by making sure that array length is substituted just once.","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":"`array!` macro is unsound when its length is impure constant","id":"GHSA-7v4j-8wvr-v55r","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2022"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"array-macro","purl":null,"source":"GHSA-7v4j-8wvr-v55r"},{"ecosystem":"crates.io","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"array-macro","purl":"pkg:cargo/array-macro","source":"GHSA-7v4j-8wvr-v55r"},{"ecosystem":"crates.io","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"array-macro","purl":"pkg:cargo/array-macro","source":"RUSTSEC-2022-0017"}],"products":null,"published":"2022-04-27","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 array initialization via impure constants allows arbitrary code execution in Rust applications using the affected macro.","url":"https://insights.sbomify.com/GHSA-7v4j-8wvr-v55r/"}