rustsec-2026-0205
Vulnerability from osv_rustsec
In affected versions of this crate, Array::insert is not exception safe. In the UPSERT path, key and value's snapshot is written to self.data_block, and after the insertion is completed, key and value are mem::forget in order to prevent double free. However, during the insertion, K::compare is invoked, which is a user-provided method. If user deliberately call panic in this function, during unwinding, the destructors of key, value, and self will all be called (since the mem::forget has not been called yet), leading to Double Free. Similar issues happens in the !UPSERT path.
The soundness issue was fixed in version 3.8.4 by using ManuallyDrop instead of mem::forget, and separating fallible code from infallible code during a node split - insert = insert_try -> insert_unchecked.
{
"affected": [
{
"database_specific": {
"categories": [],
"cvss": null,
"informational": "unsound"
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "scc",
"purl": "pkg:cargo/scc"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0-0"
},
{
"fixed": "3.8.4"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [],
"database_specific": {
"license": "CC0-1.0"
},
"details": "In affected versions of this crate, `Array::insert` is not exception safe. In the `UPSERT` path, `key` and `value`\u0027s snapshot is written to `self.data_block`, and after the insertion is completed, `key` and `value` are `mem::forget` in order to prevent double free. However, during the insertion, `K::compare` is invoked, which is a user-provided method. If user deliberately call panic in this function, during unwinding, the destructors of `key`, `value`, and `self` will all be called (since the `mem::forget` has not been called yet), leading to Double Free. Similar issues happens in the `!UPSERT` path.\n\nThe soundness issue was fixed in version `3.8.4` by using `ManuallyDrop` instead of `mem::forget`, and separating fallible code from infallible code during a node split - insert = insert_try -\u003e insert_unchecked.",
"id": "RUSTSEC-2026-0205",
"modified": "2026-07-07T09:15:02Z",
"published": "2026-07-06T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/scc"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2026-0205.html"
},
{
"type": "WEB",
"url": "https://codeberg.org/wvwwvwwv/scalable-concurrent-containers/issues/232"
}
],
"related": [],
"severity": [],
"summary": "`Array::insert` violates exception safety if compare function panics, leading to potential Double-Free"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.