# RUSTSEC-2026-0205: `Array::insert` violates exception safety if compare function panics, leading to potential Double-Free

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-07-06T12:00:00.000Z
- Modified: 2026-07-07T09:30:04.274Z

## Description

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.

(As written by RustSec Advisory Database.)

## Affected

- scc (crates.io): from 0.0.0-0 before 3.8.4

## References

- <https://crates.io/crates/scc> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0205.html> (advisory)
- <https://codeberg.org/wvwwvwwv/scalable-concurrent-containers/issues/232> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0205](https://rustsec.org/advisories/RUSTSEC-2026-0205.html), CC0-1.0, modified 2026-07-07

---

Page: https://cve.day/RUSTSEC-2026-0205 · Whole record: https://cve.day/RUSTSEC-2026-0205.json · Rebuilt by cve.day 2026-11-25T22:56:43.381Z
