GHSA-rvr2-r3pv-5m4p: Oneshot Oneshot Has Potential Use After Vulnerability
HIGHGHSA-rvr2-r3pv-5m4p is a HIGH oneshot has potential use after vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Oneshot libraries in the crates.io ecosystem. The issue involves oneshot has potential use after free when used asynchronously. Remediation is available by upgrading affected packages to version 0.1.12.
GHSA-rvr2-r3pv-5m4p at a Glance
How to Fix GHSA-rvr2-r3pv-5m4p
To remediate this vulnerability, upgrade all affected Oneshot dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade oneshot to 0.1.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for oneshot
How to Check if You Are Affected
To determine whether your application is affected by GHSA-rvr2-r3pv-5m4p, inspect your project dependencies for Oneshot:
inspect dependencies for oneshot
Analyze the terminal output to locate any version of Oneshot in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.12), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In Oneshot, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-rvr2-r3pv-5m4p Affected Oneshot Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
oneshot
|
crates.io |
< 0.1.12
|
0.1.12
|
References
Frequently Asked Questions
What is GHSA-rvr2-r3pv-5m4p?
Which Oneshot versions are affected?
What version fixes GHSA-rvr2-r3pv-5m4p?
Is oneshot affected?
What CWE is associated with GHSA-rvr2-r3pv-5m4p?
How can I check crates.io dependencies for GHSA-rvr2-r3pv-5m4p?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rvr2-r3pv-5m4p",
"modified" : "2026-01-27T00:59:05Z",
"published" : "2026-01-27T00:59:04Z",
"aliases" : [ ],
"summary" : "oneshot has potential Use After Free when used asynchronously",
"details" : "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.\n\nWhen 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).\n\nThe fix was submitted in https://github.com/faern/oneshot/pull/74 and published as part of `oneshot` version `0.1.12`.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "oneshot"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/faern/oneshot/issues/73"
}, {
"type" : "WEB",
"url" : "https://github.com/rustsec/advisory-db/pull/2600"
}, {
"type" : "WEB",
"url" : "https://github.com/faern/oneshot/commit/d1a1506010bc48962634807d0dcca682af4f50ba"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/faern/oneshot"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2026-0005.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-362", "CWE-416" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-27T00:59:04Z",
"nvd_published_at" : null
}
}