UnsoundRUSTSEC-2026-0205 · scc
RUSTSEC-2026-0205: `Array::insert` violates exception safety if compare function panics, leading to potential Double-Free
Short answerscc has an API that can cause undefined behaviour from safe code: `Array::insert` violates exception safety if compare function panics, leading to potential Double-Free. Fixed in 3.8.4.
| Crate | scc |
|---|---|
| Type | Unsound |
| Affected versions | Before 3.8.4. |
| Fixed in | 3.8.4 |
| Severity | not scored |
| Published | 2026-07-06 |
| Last changed | 2026-07-07 |
| Also known as | none |
What to do
- See which version you have:
cargo tree -i scc(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p scc. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplescc = "3.8.4") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
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.
References
- Package: crates.io/crates/scc
- Advisory: rustsec.org/advisories/RUSTSEC-2026-0205.html
- Web: codeberg.org/wvwwvwwv/scalable-concurrent-containers/issues/232
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Same cratescc: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?