RUSTSEC-2026-0528: UB can be reached from safe code

Published Nov 12, 2026
·
Updated

The variance of RefSwap and OptionRefSwap were incorrect, possibly allowing use-after-free.

OptionRefSwap::intoinner did not check for null.

The fix is to make RefSwap and OptionRefSwap invariant, and to change OptionRefSwap::intoinner 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 Software

1 affected componentFixes available
rust/ref-swap>=0.0.0-0<0.1.3
0.1.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/ref-swap to a version that resolves this vulnerability.

    Fixed in 0.1.3
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.1.3

Event History

Nov 12, 2026
Advisory Published
via OSV·12:00 PM
Data Sourced
via OSV·12:00 PM
DescriptionAffected Software

Frequently Asked Questions

1

Which versions should be reviewed?

Version 0.1.2 is affected. The fix is available in version 0.1.3.

2

How can I tell whether upgrading resolves the unsoundness for my project?

If the project still compiles with ref-swap 0.1.3, it is not affected by the unsoundness present in version 0.1.2.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203