{"id":"CVE-2021-25907","aliases":["CVE-2021-25907","GHSA-cv7x-6rc6-pq5v","RUSTSEC-2021-0010"],"related":[],"kind":"vulnerability","state":"published","title":"Double free in containers","summary":"An issue was discovered in the containers crate before 0.9.11 for Rust. When a panic occurs, a util::{mutate,mutate2} double drop can be performed.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the containers crate before 0.9.11 for Rust. When a panic occurs, a util::{mutate,mutate2} double drop can be performed.","source":"cvelist"},{"lang":"en","text":"Upon panic in a user-provided function f, fn mutate() & fn mutate2 drops twice a same object.\n\nAffected versions of this crate did not guard against double drop while temporarily duplicating an object's ownership with ptr::read().\n\nDropping a same object can result in memory corruption.\n\nThe flaw was corrected in version \"0.9.11\" by fixing the code to abort upon panic.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Upon panic in a user-provided function `f`, `fn mutate()` & `fn mutate2` drops twice a same object.\n\nAffected versions of this crate did not guard against double drop while temporarily duplicating an object's ownership with `ptr::read()`.\n\nDropping a same object can result in memory corruption.\n\nThe flaw was corrected in version \"0.9.11\" by fixing the code to abort upon panic.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate containers versiones anteriores a 0.9.11 para Rust.&#xa0;Cuando ocurre un pánico, una doble caída util::{mutate, mutate2}  puede ser llevada a cabo","source":"nvd"}],"published":"2021-01-12T12:00:00.000Z","modified":"2026-06-17T03:42:33.537Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-415"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.11"}],"ecosystem":"crates.io","package":"containers","purl":"pkg:cargo/containers","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.9.11"}],"ecosystem":"crates.io","package":"containers","purl":"pkg:cargo/containers","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.9.11"}],"vendor":"containers_project","product":"containers","cpe":"cpe:2.3:a:containers_project:containers:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0010.html","tags":["advisory","exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25907","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/strake/containers.rs/issues/2","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/strake/containers.rs","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/containers","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-25907","url":"https://www.cve.org/CVERecord?id=CVE-2021-25907","licence":"CVE Terms of Use","modified":"2024-08-03T20:11:28.473Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cv7x-6rc6-pq5v","url":"https://github.com/advisories/GHSA-cv7x-6rc6-pq5v","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:16.917Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0010","url":"https://rustsec.org/advisories/RUSTSEC-2021-0010.html","licence":"CC0-1.0","modified":"2023-11-08T04:05:16.917Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-25907","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25907","licence":"Public domain","modified":"2026-06-17T03:42:33.537Z"}],"updatedAt":"2026-11-25T22:57:59.725Z","epss":{"score":0.01571,"percentile":0.76121,"date":"2026-12-01T12:00:22.000Z"}}