{"id":"RUSTSEC-2026-0122","revision":null,"records":[{"revision":"21a9c84bb1b241519d700cb3e2e875e5","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-vfvv-c25p-m7mm","aliases":["RUSTSEC-2026-0122"],"title":"rkyv: Panic safety bugs in `InlineVec::clear` and `SerVec::clear` enable arbitrary code execution","description":"`InlineVec::clear()` and `SerVec::clear()` in `rkyv` were not panic-safe. Both functions iterate over their elements and call `drop_in_place` on each, updating `self.len` only *after* the loop. If an element's `Drop` implementation panics during the loop, `self.len` is left at its original value.\n\nA subsequent invocation of `clear()` on the same container then re-visits the already-freed elements:\n\n- `InlineVec::clear()` is called again from `InlineVec`'s own `Drop` implementation when the value is later dropped.\n- `SerVec::clear()` is called again by `SerVec::with_capacity()` after the  user closure returns.\n\n\n## Technical Impact\n\n- **CWE-415 (Double Free):** Heap corruption when element type holds `Box<T>`  \n- **CWE-416 (Use-After-Free):** Memory corruption when element reads from heap during `Drop`\n\nBoth vulnerabilities are triggerable entirely from safe Rust via `std::panic::catch_unwind` and require no special privileges.","state":0,"publishedAt":"2026-05-15T18:09:10+00:00","modifiedAt":"2026-09-10T03:50:47.7141442+00:00","affected":[{"ecosystem":"crates.io","name":"rkyv","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.8.0"},{"kind":"fixed","version":"0.8.16"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/rkyv/rkyv/commit/5828cf5c27b664eb4432c4a93d4769e12e5e42fb","https://github.com/rkyv/rkyv","https://rustsec.org/advisories/RUSTSEC-2026-0122.html"],"sourceUrl":"https://github.com/advisories/GHSA-vfvv-c25p-m7mm","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-vfvv-c25p-m7mm","identifiers":["GHSA-vfvv-c25p-m7mm","RUSTSEC-2026-0122"]},"retained":false,"historicalAffected":[]},{"revision":"839f5528bc28496caf26c355fc436ff1","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0122","aliases":["GHSA-vfvv-c25p-m7mm"],"title":"Potential use-after-free due to lack of panic safety in `InlineVec::clear` and `SerVec::clear`","description":"`InlineVec::clear()` and `SerVec::clear()` in `rkyv` were not panic-safe.\nBoth functions iterate over their elements and call `drop_in_place` on each,\nupdating `self.len` only *after* the loop. If an element's `Drop` implementation\npanics during the loop, `self.len` is left at its original value.\n\nA subsequent invocation of `clear()` on the same container then re-visits the\nalready-freed elements:\n\n- `InlineVec::clear()` is called again from `InlineVec`'s own `Drop`\n  implementation when the value is later dropped.\n- `SerVec::clear()` is called again by `SerVec::with_capacity()` after the\n  user closure returns.\n\n## Impact\n- **CWE-415 (Double Free):** heap corruption when the element type is one that\n  owns memory, such as `Box<T>` or `Vec<T>`\n- **CWE-416 (Use-After-Free):** memory corruption when an element is accessed\n  following a caught panic\n\nBoth types of undefined behavior can be invoked in safe Rust, but only if\nunwinding panics are enabled and `std::panic::catch_unwind` is used.","state":0,"publishedAt":"2026-04-23T12:00:00+00:00","modifiedAt":"2026-05-16T07:08:02+00:00","affected":[{"ecosystem":"crates.io","name":"rkyv","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.8.0"},{"kind":"fixed","version":"0.8.16"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://crates.io/crates/rkyv","https://rustsec.org/advisories/RUSTSEC-2026-0122.html","https://github.com/rkyv/rkyv/commit/5828cf5c27b664eb4432c4a93d4769e12e5e42fb"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0122","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0122","identifiers":["RUSTSEC-2026-0122","GHSA-vfvv-c25p-m7mm"]},"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-16T06:32:49.0909253+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T06:32:49.0909253+00:00","lastSuccessAt":"2026-11-16T06:32:49.2385546+00:00","error":null,"lastVerifiedAt":"2026-11-16T06:32:49.2385553+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-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-abde759308377e81e6df4bcf26cc321fb83732781fbebab464d4068d744d1a38","complete":true,"records":425880,"lastAttemptAt":"2026-11-16T06:30:42.3104975+00:00","lastSuccessAt":"2026-11-16T05:30:47.3761859+00:00","error":null,"lastVerifiedAt":"2026-11-16T06:30:42.3104975+00:00","snapshotPublishedAt":"2026-11-16T05:25:11+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-77cc6fd02adc466e81e402fc79a7ebc0","complete":false,"records":13821,"lastAttemptAt":"2026-11-16T06:43:34.3008175+00:00","lastSuccessAt":"2026-11-16T06:43:33.269+00:00","error":"174 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T06:43:33.269+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13700,"expectedIdentifiers":13874,"failedIdentifiers":174},{"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-16T06:32:49.0909253+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T06:32:49.0909253+00:00","lastSuccessAt":"2026-11-16T06:32:49.2393398+00:00","error":null,"lastVerifiedAt":"2026-11-16T06:32:49.23934+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-e13574a553734483a008bcd38cd6b056","complete":false,"records":13833,"lastAttemptAt":"2026-11-16T06:33:51.5767416+00:00","lastSuccessAt":"2026-11-16T06:33:51.573+00:00","error":"200 identifier lookups failed; latest failures include HttpError (HTTP 503). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T06:33:51.573+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13674,"expectedIdentifiers":13874,"failedIdentifiers":200},{"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-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T06:32:48.9429524+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T06:32:48.9429524+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+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-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T06:30:42.4706183+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T06:30:42.4706183+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+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-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T06:32:49.0470734+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T06:32:49.0470734+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+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-297b66f87afd66ce0c02547a007d4571597ddb0db63804850b3bb5664821bafa","complete":true,"records":232482,"lastAttemptAt":"2026-11-16T06:32:48.8045294+00:00","lastSuccessAt":"2026-11-16T06:32:47.3486736+00:00","error":null,"lastVerifiedAt":"2026-11-16T06:32:48.8045294+00:00","snapshotPublishedAt":"2026-11-16T05:48:23+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}