{"id":"RUSTSEC-2026-0528","summary":"UB can be reached from safe code","details":"The variance of `RefSwap` and `OptionRefSwap` were incorrect, possibly allowing use-after-free.\n\n`OptionRefSwap::into_inner` did not check for null.\n\nThe fix is to make `RefSwap` and `OptionRefSwap` invariant, and to change `OptionRefSwap::into_inner` to return an option.\nIt is available in version 0.1.3.\nIf your project still compiles with 0.1.3 then it is not affected by the unsoundness on version 0.1.2","modified":"2026-11-13T12:45:06.399026502Z","published":"2026-11-12T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/ref-swap"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0528.html"},{"type":"WEB","url":"https://github.com/Nitrokey/ref-swap/releases/tag/v0.1.3"}],"affected":[{"package":{"name":"ref-swap","ecosystem":"crates.io","purl":"pkg:cargo/ref-swap"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.1.3"}]}],"ecosystem_specific":{"affects":{"arch":[],"os":[],"functions":[]},"affected_functions":null},"database_specific":{"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0528.json","categories":["memory-corruption"],"cvss":null,"informational":"unsound"}}],"schema_version":"1.9.2"}