{"id":"CVE-2018-20991","aliases":["CVE-2018-20991","GHSA-rxr4-x558-x7hw","RUSTSEC-2018-0003"],"related":[],"kind":"vulnerability","state":"published","title":"Double free in smallvec","summary":"An issue was discovered in the smallvec crate before 0.6.3 for Rust. The Iterator implementation mishandles destructors, leading to a double free.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the smallvec crate before 0.6.3 for Rust. The Iterator implementation mishandles destructors, leading to a double free.","source":"cvelist"},{"lang":"en","text":"If an iterator passed to SmallVec::insert_many panicked in Iterator::next, destructors were run during unwinding while the vector was in an inconsistent state, possibly causing a double free (a destructor running on two copies of the same value).\n\nThis is fixed in smallvec 0.6.3 by ensuring that the vector's length is not updated to include moved items until they have been removed from their original positions. Items may now be leaked if Iterator::next panics, but they will not be dropped more than once.","format":"markdown","source":"ghsa"},{"lang":"en","text":"If an iterator passed to `SmallVec::insert_many` panicked in `Iterator::next`,\ndestructors were run during unwinding while the vector was in an inconsistent\nstate, possibly causing a double free (a destructor running on two copies of\nthe same value).\n\nThis is fixed in smallvec 0.6.3 by ensuring that the vector's length is not\nupdated to include moved items until they have been removed from their\noriginal positions.  Items may now be leaked if `Iterator::next` panics, but\nthey will not be dropped more than once.\n\nThank you to [@Vurich](https://github.com/Vurich) for reporting this bug.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se descubrió un problema en el paquete (crate) smallvec versiones anteriores a 0.6.3 para Rust. La implementación del Iterador maneja inapropiadamente los destructores, conllevando a una doble liberación.","source":"nvd"}],"published":"2018-07-19T12:00:00.000Z","modified":"2026-07-17T16:00:03.239Z","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-415"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.3.2","status":"affected","fixed":"0.6.3"}],"ecosystem":"crates.io","package":"smallvec","purl":"pkg:cargo/smallvec","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.3.2","status":"affected","fixed":"0.3.4"},{"type":"semver","introduced":"0.4.0-0","status":"affected","fixed":"0.4.5"},{"type":"semver","introduced":"0.5.0-0","status":"affected","fixed":"0.5.1"},{"type":"semver","introduced":"0.6.0-0","status":"affected","fixed":"0.6.3"}],"ecosystem":"crates.io","package":"smallvec","purl":"pkg:cargo/smallvec","source":"rustsec"},{"ranges":[{"status":"affected","introduced":"0.3.2","fixed":"0.6.3"}],"vendor":"servo","product":"smallvec","cpe":"cpe:2.3:a:servo:smallvec:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2018-0003.html","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-20991","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/servo/rust-smallvec/issues/96","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/servo/rust-smallvec","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/smallvec","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2018-20991","url":"https://www.cve.org/CVERecord?id=CVE-2018-20991","licence":"CVE Terms of Use","modified":"2024-08-05T12:19:27.061Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rxr4-x558-x7hw","url":"https://github.com/advisories/GHSA-rxr4-x558-x7hw","licence":"CC-BY-4.0","modified":"2023-11-08T04:00:13.368Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2018-0003","url":"https://rustsec.org/advisories/RUSTSEC-2018-0003.html","licence":"CC0-1.0","modified":"2026-07-17T16:00:03.239Z"},{"source":"nvd","name":"NVD","id":"CVE-2018-20991","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-20991","licence":"Public domain","modified":"2026-06-17T01:53:53.667Z"}],"updatedAt":"2026-11-25T22:57:42.464Z","epss":{"score":0.01848,"percentile":0.79701,"date":"2026-12-01T12:00:22.000Z"}}