Rust advisories / containers
Vulnerability CriticalRUSTSEC-2021-0010 · containers
RUSTSEC-2021-0010: panic safety: double drop may happen within `util::{mutate, mutate2}`
Short answerA security vulnerability in the containers crate: panic safety: double drop may happen within `util::{mutate, mutate2}`. Critical severity (CVSS 9.8). Fixed in 0.9.11: update to a fixed version.
| Crate | containers |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | Before 0.9.11. |
| Fixed in | 0.9.11 |
| Severity | Critical, CVSS 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2021-01-12 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2021-25907, GHSA-cv7x-6rc6-pq5v |
What to do
- See which version you have:
cargo tree -i containers(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p containers. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplecontainers = "0.9.11") 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
Upon panic in a user-provided function f, fn mutate() & fn mutate2 drops twice a same object.
Affected versions of this crate did not guard against double drop while temporarily duplicating an object's ownership with ptr::read().
Dropping a same object can result in memory corruption.
The flaw was corrected in version "0.9.11" by fixing the code to abort upon panic.
References
- Package: crates.io/crates/containers
- Advisory: rustsec.org/advisories/RUSTSEC-2021-0010.html
- Report: github.com/strake/containers.rs/issues/2
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?