{"id":"RUSTSEC-2026-0301","revision":null,"records":[{"revision":"920bfe57f82849b6bc77b14fcf65ff96","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0301","aliases":[],"title":"Double free in `StackVec::retain` when a predicate or element `Drop` panics","description":"## Summary\n\n`StackVec::retain` committed its new length to `self.len` only after\nits internal loop completed. If the retain predicate or a removed\nelement's `Drop` implementation panicked before the loop finished,\nunwinding proceeded with `self.len` still equal to the original,\npre-retain length, leaving either a duplicated or already-destroyed\nelement inside `0..len`. `StackVec`'s own `Drop` then revisited that\nslot, causing a double-drop (and for heap-owning types, a double-free).\n\n## Impact\n\nAffects `StackVec<T, CAP>::retain` for `T: Drop` types where the\npredicate or the removed element's destructor can panic, on builds\nwith unwinding enabled (`panic = \"unwind\"`). `no_std`/`panic = \"abort\"`\nbuilds cannot trigger this, since unwinding never occurs.\n\n## Patch\n\nFixed in 0.3.3 using an unwind-safe backshift guard, matching the\napproach `alloc::vec::Vec::retain` uses.","state":0,"publishedAt":"2026-09-22T12:00:00+00:00","modifiedAt":"2026-09-22T21:00:02.8709179+00:00","affected":[{"ecosystem":"crates.io","name":"stack_collections","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.3.0"},{"kind":"fixed","version":"0.3.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://crates.io/crates/stack_collections","https://rustsec.org/advisories/RUSTSEC-2026-0301.html","https://github.com/OverwrittenCode/stack_collections/pull/4"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0301","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0301","identifiers":["RUSTSEC-2026-0301"]},"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-12T22:18:31.2281733+00:00","complete":true,"records":1779,"lastAttemptAt":"2026-11-12T22:18:31.2281733+00:00","lastSuccessAt":"2026-11-12T22:18:31.3822045+00:00","error":null,"lastVerifiedAt":"2026-11-12T22:18:31.3822092+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-64752486c567b55b31fb0d7225f5222bcd0019564ac0ac5f0649e242c7b19299-16791b8f0b014c31f70da658b9fd545a9a3d610de41d0410119387c383ffb593","complete":true,"records":424878,"lastAttemptAt":"2026-11-12T22:16:26.3594216+00:00","lastSuccessAt":"2026-11-12T22:16:26.1871211+00:00","error":null,"lastVerifiedAt":"2026-11-12T22:16:26.3594216+00:00","snapshotPublishedAt":"2026-11-12T21:27:47+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-20099423d0a548edb4e26b36193686ef","complete":true,"records":13783,"lastAttemptAt":"2026-11-12T22:19:06.2635939+00:00","lastSuccessAt":"2026-11-12T22:19:06.257+00:00","error":null,"lastVerifiedAt":"2026-11-12T22:19:06.257+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13836,"expectedIdentifiers":13836,"failedIdentifiers":0},{"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-12T22:18:31.2281733+00:00","complete":true,"records":1123,"lastAttemptAt":"2026-11-12T22:18:31.2281733+00:00","lastSuccessAt":"2026-11-12T22:18:31.3835782+00:00","error":null,"lastVerifiedAt":"2026-11-12T22:18:31.3835785+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-f80f171c7ef543579f53e7923e9f8fb5","complete":false,"records":13780,"lastAttemptAt":"2026-11-12T22:18:56.7808041+00:00","lastSuccessAt":"2026-11-12T22:18:56.777+00:00","error":null,"lastVerifiedAt":"2026-11-12T22:18:56.777+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13830,"expectedIdentifiers":13836,"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-0db4c534aaa8e6aa34cb4db66b1c3dbcd45a9d81a0f263fa9d438e08e81869b0","complete":true,"records":9952,"lastAttemptAt":"2026-11-12T22:18:26.2249729+00:00","lastSuccessAt":"2026-11-12T21:16:34.1869923+00:00","error":null,"lastVerifiedAt":"2026-11-12T22:18:26.2249729+00:00","snapshotPublishedAt":"2026-11-12T21:03:11+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-4d60731753a2f72e455d1086e7203d0ef10843936dcc1cf2b45135e2caa204b0","complete":true,"records":2012,"lastAttemptAt":"2026-11-12T22:16:26.5281803+00:00","lastSuccessAt":"2026-11-12T18:16:50.7862525+00:00","error":null,"lastVerifiedAt":"2026-11-12T22:16:26.5281803+00:00","snapshotPublishedAt":"2026-11-12T17:48:11+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-20d1a8ab073a1c13ab2143dbcadb34ebb8edf1e18e16482b448513662c3d1e12","complete":true,"records":3127,"lastAttemptAt":"2026-11-12T22:18:31.1830853+00:00","lastSuccessAt":"2026-11-12T22:18:31.0338213+00:00","error":null,"lastVerifiedAt":"2026-11-12T22:18:31.1830853+00:00","snapshotPublishedAt":"2026-11-12T22:18:06+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-4f7217a2d9ebf21bab7a8bab59b4d3fa8bd423b2cd5df11e8f5760660ca322cb","complete":true,"records":231732,"lastAttemptAt":"2026-11-12T22:18:26.0782283+00:00","lastSuccessAt":"2026-11-12T22:18:24.5775428+00:00","error":null,"lastVerifiedAt":"2026-11-12T22:18:26.0782283+00:00","snapshotPublishedAt":"2026-11-12T21:48:11+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}