GHSA-rvr2-r3pv-5m4p oneshot has potential Use After Free when used asynchronously

Not scored Published

A race condition in the oneshot Rust library allows use-after-free when a receiver is dropped during polling, potentially leading to code execution or crashes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Not stated
Victim action needed
Not needed
Fix
Available

What is GHSA-rvr2-r3pv-5m4p?

GHSA-rvr2-r3pv-5m4p is an use after free vulnerability in oneshot, published on 25 Jan 2026.

Official description

There is a race condition that can lead to a use-after-free if a oneshot::Receiver is polled but then dropped instead of polled to completion. This could happen if the receiver future was cancelled while receiving, for example by being wrapped in a timeout future or similar.

When the Receiver is polled (Future::poll) it writes a waker to the channel and sets it to the RECEIVING state. If the Receiver was then dropped (instead of polled to completion), the Drop implementation on Receiver unconditionally swapped the channel state to DISCONNECTED and only after doing so it read back its waker from the heap allocation and dropped it. The problem is that the DISCONNECTED state could be observed by the Sender, which would lead to it deallocating the channel heap memory. If the Sender manage to free the channel before the Receiver managed to proceed to dropping the waker, then the Receiver would read from the freed channel memory (Use After Free).

The fix was submitted in https://github.com/faern/oneshot/pull/74 and published as part of oneshot version 0.1.12.

Which versions are affected by GHSA-rvr2-r3pv-5m4p?

3 open source packages ship an affected version, including oneshot.

PackageAffectedFixed in
oneshot crates.ioAll versions0.1.12
oneshot crates.ioAll versions0.1.12
oneshot crates.ioFrom 0.1.2-00.1.12

How do I fix GHSA-rvr2-r3pv-5m4p?

Upgrade oneshot to 0.1.12 or later.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is GHSA-rvr2-r3pv-5m4p being exploited?

There is no known exploitation of GHSA-rvr2-r3pv-5m4p in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2026-0005.

Is GHSA-rvr2-r3pv-5m4p in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free