Email me

Rust advisories / scc

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.

Cratescc
TypeUnsound
Affected versionsBefore 3.8.4.
Fixed in3.8.4
Severitynot scored
Published2026-07-06
Last changed2026-07-07
Also known asnone

What to do

  1. See which version you have: cargo tree -i scc (it also shows which of your dependencies pulls it in).
  2. 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 example scc = "3.8.4") or update the dependency that pulls it in.
  3. 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

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?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ