Email me

Rust advisories / salsa

UnsoundRUSTSEC-2026-0308 · salsa

RUSTSEC-2026-0308: Use-after-free in interned values and cached function results

Short answersalsa has an API that can cause undefined behaviour from safe code: Use-after-free in interned values and cached function results. Fixed in 0.28.5.

Cratesalsa
TypeUnsound (memory-corruption, memory-exposure, code-execution)
Affected versionsFrom 0.23.0 before 0.28.5.
Fixed in0.28.5
Severitynot scored
Published2026-09-24
Last changed2026-09-24
Also known asGHSA-xc3w-55vh-cw3w

What to do

  1. See which version you have: cargo tree -i salsa (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p salsa. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example salsa = "0.28.5") 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

When an application reads an interned value's fields or uses that value as an input to a tracked function, Salsa must ensure that reusable storage has been validated for the current database revision. This prevents the value's fields and associated cached function results from being freed while in use. Affected versions checked this invariant only with debug_assert! when reading fields, and did not check it when using an interned value to access a tracked function's cached result.

Bugs in Salsa's dependency tracking, or an application-provided Eq implementation that incorrectly treats a changed query result as unchanged, can cause Salsa to reuse cached results containing stale interned values. If the application accesses these values and then interns additional values, Salsa can free the old fields or cached function results while references to them are still in use. This causes use-after-free through safe Rust APIs. Depending on the consuming application, attacker-controlled input may expose process memory or permit arbitrary code execution.

The fix asserts that an interned value's reusable storage has been validated for the current database revision before allowing an application to read its fields or access a tracked function's cached result using that value as input. If the assertion fails, Salsa panics before returning references to storage that could be freed while in use.

Salsa 0.28.5 and newer address this vulnerability. Dependent applications should update Salsa and rebuild.

Applications that disable garbage collection for all explicitly declared interned structs using #[salsa::interned(revisions = usize::MAX)] and do not use implicitly interned query arguments are not affected by this vulnerability.

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

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.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