CVE-2020-35924
Description
An issue was discovered in the try-mutex crate before 0.3.0 for Rust. TryMutex allows cross-thread sending of a non-Send type.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The try-mutex crate before 0.3.0 unsafely implements Sync for TryMutex, allowing non-Send types like Rc to be sent across threads, risking data races.
Vulnerability
Description The try-mutex crate (versions prior to 0.3.0) unconditionally implemented the Sync trait for TryMutex, meaning the type was considered safe to share across threads regardless of whether T implements Send [2]. This violates Rust's thread-safety guarantees, as Sync should only be implemented when T: Send (as the standard library's Mutex does). The flaw was reported by researchers scanning crates.io for soundness bugs [4].
Exploitation
An attacker (or any user of the crate) can exploit this by wrapping a non-Send type, such as Rc, inside a TryMutex and then sending the mutex to another thread. Because TryMutex incorrectly implements Sync, the compiler does not prevent the cross-thread transfer. A proof-of-concept using crossbeam_utils::thread demonstrates that two threads can hold references to the same Rc instance, leading to concurrent access [4]. No special privileges are required beyond the ability to execute code that uses the vulnerable crate.
Impact
Successful exploitation allows data races on types that are not designed for concurrent access. For example, Rc (reference-counted pointer) is not atomic; concurrent increment/decrement of its reference count can cause use-after-free, double-free, or other memory corruption. The CVSS score is 5.5 (Medium) with availability impact rated High, as the most likely outcome is a crash or undefined behavior [2]. Confidentiality and integrity are not directly affected, but memory corruption could potentially be leveraged further.
Mitigation
The issue is fixed in version 0.3.0 of the try-mutex crate, which adds the T: Send bound to the Sync implementation [2]. Users should update to >=0.3.0. No workaround exists for older versions; the crate is no longer maintained, so upgrading is the only option.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
try-mutexcrates.io | < 0.3.0 | 0.3.0 |
Affected products
3- Rust/try-mutexdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-64j8-7gp2-xjx5ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2020-35924ghsaADVISORY
- github.com/mpdn/try-mutex/issues/2ghsaWEB
- rustsec.org/advisories/RUSTSEC-2020-0087.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.