GHSA-xc3w-55vh-cw3w
Use-after-free in interned values and cached function results
GHSA-xc3w-55vh-cw3w is a vulnerability with no CVSS score yet in salsa, published September 24, 2026. No source lists public exploit code. Fixed in salsa 0.28.5.
- Severity
- UnratedNo CVSS score yet
- Exploit chance
- UnscoredNo EPSS score yet
- Exploitation
- None knownNot on CISA’s or ENISA’s lists
- Fixed in
0.28.5salsa
Description
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.
Affected packages
| Package | Affected | Fixed |
|---|---|---|
salsacrates.io | 0.23.0 up to 0.28.5 | 0.28.5 |
What each source reports
OSVRUSTSEC-2026-0308No score
Use-after-free in interned values and cached function results
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.
- Record
RUSTSEC-2026-0308- Updated
- 2026-11-02
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.