RUSTSEC-2026-0528
not scored yetUB can be reached from safe code
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
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | ref-swap | >= 0.0.0-0, < 0.1.3 | 0.1.3 |
References
- https://crates.io/crates/ref-swap · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2026-0528.html · ADVISORY
- https://github.com/Nitrokey/ref-swap/releases/tag/v0.1.3 · WEB
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 12 Nov 2026)