CVE-2020-35874
Description
An issue was discovered in the internment crate through 2020-05-28 for Rust. ArcIntern::drop has a race condition and resultant use-after-free.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A race condition in Rust's `internment` crate `ArcIntern::drop` can lead to a use-after-free vulnerability, allowing memory corruption.
Vulnerability
CVE-2020-35874 describes a race condition in the ArcIntern::drop function of the internment crate for Rust. The issue occurs because the function decrements the reference count and then, if the count reaches zero, attempts to remove the value from an internal map. However, between the count decrement and the map removal, a concurrent thread can create a new ArcIntern with the same value. This new allocation can reuse the memory that the first thread is about to free, leading to a dangling pointer and a use-after-free condition when the original thread removes the entry from the map [1][3].
Exploitation
The vulnerability is exploitable by an attacker who can influence the concurrent creation and dropping of ArcIntern instances with the same value. An attacker does not need any special privileges, but the attack complexity is high due to the precise timing required to trigger the race condition (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) [3]. The attack surface is limited to applications that use the ArcIntern type and where an attacker can control the values being interned or influence the timing of drop operations [1][2].
Impact
A successful exploit can lead to memory corruption, potentially allowing an attacker to achieve arbitrary read/write primitives, resulting in high impacts on confidentiality, integrity, and availability [3]. The vulnerability is memory-corruption type and has been assigned a CVSS score of 8.1 (HIGH).
Mitigation
The issue was patched in version 0.4.0 of the internment crate. Users are advised to update to 0.4.0 or later. Versions prior to 0.3.12 are unaffected by this specific vulnerability (likely due to lacking the ArcIntern feature) [3]. No workarounds are documented; updating is the recommended action.
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 |
|---|---|---|
internmentcrates.io | >= 0.3.12, < 0.4.0 | 0.4.0 |
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-96w3-p368-4h8cghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2020-35874ghsaADVISORY
- github.com/droundy/internment/issues/11ghsaWEB
- rustsec.org/advisories/RUSTSEC-2020-0017.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.