{"answers":{"affected":"1 open source package ship an affected version, including stackvector.","exploited":"There is no known exploitation of RUSTSEC-2025-0166 in the wild and no public exploit code.","fix":"Upgrade stackvector to 2.0.0 or later.","what":"RUSTSEC-2025-0166 is a memory corruption vulnerability in stackvector, published on 23 Oct 2025."},"fix_prompt":"Check this codebase for RUSTSEC-2025-0166 and fix it if it is affected.\n\nWhat it is: RUSTSEC-2025-0166 is a memory corruption vulnerability in stackvector, published on 23 Oct 2025. \nExploitation: There is no known exploitation of RUSTSEC-2025-0166 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- stackvector (crates.io): affected from 0.0.0-0; fixed in 2.0.0\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/RUSTSEC-2025-0166/ (Markdown: https://insights.sbomify.com/RUSTSEC-2025-0166/index.md)","id":"RUSTSEC-2025-0166","markdown":"https://insights.sbomify.com/RUSTSEC-2025-0166/index.md","name":"RUSTSEC-2025-0166","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust stackvector library","requires_auth":"none","summary":"Safe Rust code can trigger undefined behavior via out-of-bounds memory access in the stackvector library, potentially leading to crashes or code execution.","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 `stackvector` contained multiple soundness issues that could allow safe Rust code to trigger undefined behavior.\n\nOne issue was that `StackVec::length` was exposed as a public field. Safe Rust code could set `length` to a value larger than the backing array capacity. Other safe methods, including `remove`, `pop`, and `truncate`, relied on `length` before performing unsafe pointer operations (`ptr::read`, `ptr::copy`, `offset`/`add`). If `length` was corrupted by safe code, these methods could perform out-of-bounds pointer arithmetic, reads, writes, or copies.\n\nThe upstream maintainer also identified additional soundness issues, including the use of `mem::uninitialized` in `StackVec::from_vec_unchecked`, which was reachable through `from_vec`, and Miri violations related to `MaybeUninit` usage.\n\nVersion `2.0.0` was released to fix the known soundness issues.","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":"Multiple soundness issues in `stackvector`","id":"RUSTSEC-2025-0166","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2025"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["2.0.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"stackvector","purl":"pkg:cargo/stackvector","source":"RUSTSEC-2025-0166"}],"products":null,"published":"2025-10-23","related":[],"sources":[{"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":"Safe Rust code can trigger undefined behavior via out-of-bounds memory access in the stackvector library, potentially leading to crashes or code execution.","url":"https://insights.sbomify.com/RUSTSEC-2025-0166/"}