{"id":"CVE-2018-21000","aliases":["CVE-2018-21000","GHSA-2v78-j59h-fmpf","RUSTSEC-2018-0013"],"related":[],"kind":"vulnerability","state":"published","title":"Heap overflow or corruption in safe-transmute","summary":"An issue was discovered in the safe-transmute crate before 0.10.1 for Rust. A constructor's arguments are in the wrong order, causing heap memory corruption.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the safe-transmute crate before 0.10.1 for Rust. A constructor's arguments are in the wrong order, causing heap memory corruption.","source":"cvelist"},{"lang":"en","text":"Affected versions of this crate switched the length and capacity arguments in the Vec::from_raw_parts() constructor, which could lead to memory corruption or data leakage.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Affected versions of this crate switched the length and capacity arguments in the Vec::from_raw_parts() constructor,\nwhich could lead to memory corruption or data leakage.\n\nThe flaw was corrected by using the constructor correctly.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se descubrió un problema en el paquete (crate) safe-transmute versiones anteriores a 0.10.1 para Rust. Los argumentos de un constructor están en el orden incorrecto, causando una corrupción en la memoria de la pila.","source":"nvd"}],"published":"2018-11-27T12:00:00.000Z","modified":"2026-06-17T01:53:54.837Z","severity":{"scorer":"NVD","scheme":"CVSS:3.0","vector":"CVSS:3.0/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.0","vector":"CVSS:3.0/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.0","vector":"CVSS:3.0/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.0","vector":"CVSS:3.0/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-119"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.4.0","status":"affected","fixed":"0.10.1"}],"ecosystem":"crates.io","package":"safe-transmute","purl":"pkg:cargo/safe-transmute","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.4.0","status":"affected","fixed":"0.10.1"}],"ecosystem":"crates.io","package":"safe-transmute","purl":"pkg:cargo/safe-transmute","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.10.1"}],"vendor":"safe-transmute_project","product":"safe-transmute","cpe":"cpe:2.3:a:safe-transmute_project:safe-transmute:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2018-0013.html","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://github.com/nabijaczleweli/safe-transmute-rs/pull/36","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-21000","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nabijaczleweli/safe-transmute-rs/commit/a134e06d740f9d7c287f74c0af2cd06206774364","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nabijaczleweli/safe-transmute-rs","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/safe-transmute","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2018-21000","url":"https://www.cve.org/CVERecord?id=CVE-2018-21000","licence":"CVE Terms of Use","modified":"2024-08-05T12:19:27.130Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2v78-j59h-fmpf","url":"https://github.com/advisories/GHSA-2v78-j59h-fmpf","licence":"CC-BY-4.0","modified":"2023-11-08T04:00:13.925Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2018-0013","url":"https://rustsec.org/advisories/RUSTSEC-2018-0013.html","licence":"CC0-1.0","modified":"2023-11-08T04:00:13.925Z"},{"source":"nvd","name":"NVD","id":"CVE-2018-21000","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-21000","licence":"Public domain","modified":"2026-06-17T01:53:54.837Z"}],"updatedAt":"2026-11-25T22:57:42.465Z","epss":{"score":0.01977,"percentile":0.81095,"date":"2026-12-01T12:00:22.000Z"}}