RUSTSEC-2026-0528

published 12 Nov 2026 · updated 13 Nov 2026

UB can be reached from safe code

5.0Medium

No exploitation in the wild has been reported. Fixed in ref-swap 0.1.3.

The variance of `RefSwap` and `OptionRefSwap` were incorrect, possibly allowing use-after-free. `OptionRefSwap::into_inner` did not check for null. The fix is to make `RefSwap` and `OptionRefSwap` invariant, and to change `OptionRefSwap::into_inner` to return an option. It is available in version 0.1.3. If your project still compiles with 0.1.3 then it is not affected by the unsoundness on version 0.1.2

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
cargo: ref-swap>=0.0.0-0 <0.1.30.1.3

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

RUSTSEC-2026-0528 severity on Zeptric[![RUSTSEC-2026-0528](https://zeptric.io/badge/cve/RUSTSEC-2026-0528.svg)](https://zeptric.io/cve/RUSTSEC-2026-0528)