{"id":"RUSTSEC-2026-0272","revision":null,"records":[{"revision":"3dc2f06540294a728c4baf3d6db3032f","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0272","aliases":[],"title":"Panic-safety unsoundness in `Stack::pop`, `Fifo::pop_front` and `Value::replace_stable` (use-after-free / double-free)","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.","state":0,"publishedAt":"2026-08-27T12:00:00+00:00","modifiedAt":"2026-08-31T09:45:02.9326702+00:00","affected":[{"ecosystem":"crates.io","name":"stack_dst","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"0.8.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://crates.io/crates/stack_dst","https://rustsec.org/advisories/RUSTSEC-2026-0272.html","https://github.com/thepowersgang/stack_dst-rs/issues/16"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0272","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0272","identifiers":["RUSTSEC-2026-0272"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-20T05:22:50.5521925+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-20T05:22:50.5521925+00:00","lastSuccessAt":"2026-11-20T05:22:50.7238658+00:00","error":null,"lastVerifiedAt":"2026-11-20T05:22:50.7238668+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-ab394367b327976f2e615091908e1dede6760751304792bb06c748f95767cbef-ec2d596ad7bfc6097825bd4daa078c4bda4a78dec1a6523b2a70fcc0f91a6034","complete":true,"records":429283,"lastAttemptAt":"2026-11-20T05:20:58.9256424+00:00","lastSuccessAt":"2026-11-20T05:20:58.9042851+00:00","error":null,"lastVerifiedAt":"2026-11-20T05:20:58.9256424+00:00","snapshotPublishedAt":"2026-11-20T04:30:32+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-7c3c7b9741cd40649f842d0c85acb763","complete":false,"records":13903,"lastAttemptAt":"2026-11-20T05:32:14.2321076+00:00","lastSuccessAt":"2026-11-20T05:32:14.3963409+00:00","error":null,"lastVerifiedAt":"2026-11-20T05:32:14.3963409+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-20T05:22:50.5521925+00:00","complete":true,"records":1130,"lastAttemptAt":"2026-11-20T05:22:50.5521925+00:00","lastSuccessAt":"2026-11-20T05:22:50.724793+00:00","error":null,"lastVerifiedAt":"2026-11-20T05:22:50.7247972+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-c2e17479a0944822a3fc332e41d782e6","complete":true,"records":13915,"lastAttemptAt":"2026-11-20T05:23:16.2123882+00:00","lastSuccessAt":"2026-11-20T05:23:16.2+00:00","error":null,"lastVerifiedAt":"2026-11-20T05:23:16.2+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13951,"expectedIdentifiers":13951,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-8c782c8bda9dbab8135c62bfbc9a19fa3557f15c26fbd641daea6b40b297253e","complete":true,"records":9981,"lastAttemptAt":"2026-11-20T05:22:50.3957466+00:00","lastSuccessAt":"2026-11-20T01:30:46.6941716+00:00","error":null,"lastVerifiedAt":"2026-11-20T05:22:50.3957466+00:00","snapshotPublishedAt":"2026-11-20T00:33:13+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-94b3a229089d62296b97f627a772880f88ab7164d62486372661c0a39e321234","complete":true,"records":2019,"lastAttemptAt":"2026-11-20T05:21:00.0795074+00:00","lastSuccessAt":"2026-11-20T01:29:01.8774014+00:00","error":null,"lastVerifiedAt":"2026-11-20T05:21:00.0795074+00:00","snapshotPublishedAt":"2026-11-20T00:17:59+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-7ce196026235c6501d0b2fb81592d1b9dc06e8705525d41efefd322e75f6c22f","complete":true,"records":3200,"lastAttemptAt":"2026-11-20T05:22:50.5023879+00:00","lastSuccessAt":"2026-11-20T01:30:49.8670987+00:00","error":null,"lastVerifiedAt":"2026-11-20T05:22:50.5023879+00:00","snapshotPublishedAt":"2026-11-20T00:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-0d27aaea4c8b5bf85c535469f477ce931bdd4dd6863647c189102b2f55db2046","complete":true,"records":232824,"lastAttemptAt":"2026-11-20T05:22:50.2656897+00:00","lastSuccessAt":"2026-11-20T05:22:49.1516996+00:00","error":null,"lastVerifiedAt":"2026-11-20T05:22:50.2656897+00:00","snapshotPublishedAt":"2026-11-20T05:18:27+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}