{"id":"CVE-2021-26951","aliases":["CVE-2021-26951","GHSA-ppqp-78xx-3r38","RUSTSEC-2021-0015"],"related":[],"kind":"vulnerability","state":"published","title":"Out of bounds write in calamine","summary":"An issue was discovered in the calamine crate before 0.17.0 for Rust. It allows attackers to overwrite heap-memory locations because Vec::set_len is used without proper memory claiming, and this uninitialized memory is used for a user-provided Read operation, as demonstrated by Sectors::get.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the calamine crate before 0.17.0 for Rust. It allows attackers to overwrite heap-memory locations because Vec::set_len is used without proper memory claiming, and this uninitialized memory is used for a user-provided Read operation, as demonstrated by Sectors::get.","source":"cvelist"},{"lang":"en","text":"Affected versions of this crate arbitrarily calls `Vec::set_len` to increase length of a vector without claiming more memory for the vector. Affected versions of this crate\nalso calls user-provided `Read` on the uninitialized memory of the vector that was\nextended with `Vec::set_len`.\n\nThis can overwrite active entities in adjacent heap memory and seems to be a major security issue. Also, calling user-provided `Read` on uninitialized memory is defined as UB in Rust.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate calamine versiones anteriores a 0.17.0 para Rust.&#xa0;Permite a atacantes sobrescribir las ubicaciones de la memoria de la pila porque la función Vec::set_len es usada sin el requerimiento de memoria apropiado, y esta memoria no inicializada se usa para una operación de Lectura proporcionada por el usuario, como es demostrado por la función Sectors::get","source":"nvd"}],"published":"2021-01-06T12:00:00.000Z","modified":"2026-06-17T03:44:03.790Z","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-787","CWE-908"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.17.0"}],"ecosystem":"crates.io","package":"calamine","purl":"pkg:cargo/calamine","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.17.0"}],"ecosystem":"crates.io","package":"calamine","purl":"pkg:cargo/calamine","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.17.0"}],"vendor":"calamine_project","product":"calamine","cpe":"cpe:2.3:a:calamine_project:calamine:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0015.html","tags":["advisory","exploit","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-26951","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/tafia/calamine/issues/199","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/tafia/calamine","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/calamine","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-26951","url":"https://www.cve.org/CVERecord?id=CVE-2021-26951","licence":"CVE Terms of Use","modified":"2024-08-03T20:33:41.380Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-ppqp-78xx-3r38","url":"https://github.com/advisories/GHSA-ppqp-78xx-3r38","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:22.828Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0015","url":"https://rustsec.org/advisories/RUSTSEC-2021-0015.html","licence":"CC0-1.0","modified":"2023-11-08T04:05:22.828Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-26951","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-26951","licence":"Public domain","modified":"2026-06-17T03:44:03.790Z"}],"updatedAt":"2026-11-25T22:57:59.873Z","epss":{"score":0.01749,"percentile":0.78516,"date":"2026-12-01T12:00:22.000Z"}}