{"answers":{"affected":"1 open source package ship an affected version, including stack_dst.","exploited":"There is no known exploitation of RUSTSEC-2026-0272 in the wild and no public exploit code.","fix":"Upgrade stack_dst to 0.8.2 or later.","what":"RUSTSEC-2026-0272 is an use after free vulnerability in stack_dst, published on 27 Aug 2026."},"fix_prompt":"Check this codebase for RUSTSEC-2026-0272 and fix it if it is affected.\n\nWhat it is: RUSTSEC-2026-0272 is an use after free vulnerability in stack_dst, published on 27 Aug 2026. \nExploitation: There is no known exploitation of RUSTSEC-2026-0272 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- stack_dst (crates.io): affected from 0.0.0-0; fixed in 0.8.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/RUSTSEC-2026-0272/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0272/index.md)","id":"RUSTSEC-2026-0272","markdown":"https://insights.sbomify.com/RUSTSEC-2026-0272/index.md","name":"RUSTSEC-2026-0272","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 data structure library","requires_auth":"none","summary":"A double-free vulnerability in Rust container operations allows attackers to corrupt memory and potentially execute code if element destructors panic.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Three removal and replacement paths destroy an initialized value before\ncommitting the metadata change that removes it. Destruction runs `T::drop()`,\nwhich is user code and may panic. If it does, the commit is skipped and the\ncontainer still claims ownership of the already-destroyed value, so its own\ndestructor drops that value a second time.\n\n`Stack::pop` drops the top value before reducing `next_ofs`. `Stack`'s\ndestructor pops in a loop, so an unchanged `next_ofs` re-drops the same value.\n\n`Fifo::pop_front` (via `pop_front_inner`) drops the front value before advancing\n`read_pos`. An unchanged `read_pos` still points at the destroyed value.\n\n`Value::replace_stable` drops the existing value before writing the replacement.\nIf the destructor panics the replacement is never written, but the backing\nstorage still holds the old value's metadata.\n\nThis is separate from RUSTSEC-2021-0033, which covered a clone panic on\ninsertion in `push_cloned` and was fixed in 0.6.1.\n\n## Impact\n\nA heap-owning value is freed twice, corrupting the allocator. Reachable from\nsafe Rust with any element type whose `Drop` can panic — no `unsafe` on the\ncaller's side.\n\n* CWE-415 (Double Free)\n* CWE-416 (Use-After-Free)\n\nConfirmed under AddressSanitizer, which reports `attempting double-free` on all\nthree paths.\n\n## Fix\n\nFixed in 0.8.2.","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":"Panic-safety unsoundness in `Stack::pop`, `Fifo::pop_front` and `Value::replace_stable` (use-after-free / double-free)","id":"RUSTSEC-2026-0272","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"use_after_free","year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.8.2"],"introduced":["0.0.0-0"],"last_affected":[],"package":"stack_dst","purl":"pkg:cargo/stack_dst","source":"RUSTSEC-2026-0272"}],"products":null,"published":"2026-08-27","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":"A double-free vulnerability in Rust container operations allows attackers to corrupt memory and potentially execute code if element destructors panic.","url":"https://insights.sbomify.com/RUSTSEC-2026-0272/"}