Rust advisories / z3
VulnerabilityRUSTSEC-2026-0295 · z3
RUSTSEC-2026-0295: Memory corruption bug on `ApplyResult` type
Short answerA security vulnerability in the z3 crate: Memory corruption bug on `ApplyResult` type. No severity score was published. Fixed in 0.21.0: update to a fixed version.
| Crate | z3 |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | Before 0.21.0. |
| Fixed in | 0.21.0 |
| Severity | not scored |
| Published | 2026-08-12 |
| Last changed | 2026-09-21 |
| Also known as | none |
What to do
- See which version you have:
cargo tree -i z3(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p z3. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplez3 = "0.21.0") 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
The ApplyResult type contains a raw pointer to a C++ memory object and has a derived Clone implementation which creates a reference to this object without incrementing the associated reference counter.
As a result, if an instance of ApplyResult is duplicated through Clone and both instances are dropped a use-after-free can occur.
References
- Package: crates.io/crates/z3
- Advisory: rustsec.org/advisories/RUSTSEC-2026-0295.html
- Web: github.com/prove-rs/z3.rs/pull/578
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 →Also worth your time
Did this answer your question?