{"id":"CVE-2020-35916","aliases":["CVE-2020-35916","GHSA-9wgh-vjj7-7433","RUSTSEC-2020-0073"],"related":[],"kind":"vulnerability","state":"published","title":"Mutable reference with immutable provenance in image","summary":"An issue was discovered in the image crate before 0.23.12 for Rust. A Mutable reference has immutable provenance. (In the case of LLVM, the IR may be always correct.)","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the image crate before 0.23.12 for Rust. A Mutable reference has immutable provenance. (In the case of LLVM, the IR may be always correct.)","source":"cvelist"},{"lang":"en","text":"A mutable reference to a struct was constructed by dereferencing a pointer obtained from slice::as_ptr. Instead, slice::as_mut_ptr should have been called on the mutable slice argument. The former performs an implicit reborrow as an immutable shared reference which does not allow writing through the derived pointer.","format":"markdown","source":"ghsa"},{"lang":"en","text":"A mutable reference to a struct was constructed by dereferencing a pointer\nobtained from `slice::as_ptr`. Instead, `slice::as_mut_ptr` should have been\ncalled on the mutable slice argument. The former performs an implicit reborrow\nas an immutable shared reference which does not allow writing through the\nderived pointer.\n\nThere is no evidence for miscompilation, exploitable or otherwise, caused by\nthis bug. [Further investigation on Zulip][Zulip] suggests that the unoptimized\ngenerated LLVM IR does not contain any UB itself, effectively mitigating\nfurther effects.\n\n[Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/146229-wg-secure-code/topic/Implications.20of.20using.20.60slice.3A.3Aas_ptr.60.20for.20mutable.20access/near/216499472","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate image versiones anteriores a 0.23.12 para Rust.&#xa0;Una referencia mutable presenta una procedencia inmutable.&#xa0;(En el caso de LLVM, el IR puede ser siempre correcto).","source":"nvd"}],"published":"2020-11-12T12:00:00.000Z","modified":"2026-06-17T03:14:35.987Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:L/AC:L/Au:N/C:N/I:N/A:P","score":2.1,"rating":"LOW"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.23.12"}],"ecosystem":"crates.io","package":"image","purl":"pkg:cargo/image","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.23.12"}],"ecosystem":"crates.io","package":"image","purl":"pkg:cargo/image","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.23.12"}],"vendor":"image-rs","product":"image","cpe":"cpe:2.3:a:image-rs:image:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0073.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-2020-35916","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/image-rs/image/issues/1357","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/image-rs/image/pull/1358","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/image-rs/image/commit/5cbe1e6767d11aff3f14c7ad69a06b04e8d583c7","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/image-rs/image","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/image","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-35916","url":"https://www.cve.org/CVERecord?id=CVE-2020-35916","licence":"CVE Terms of Use","modified":"2024-08-04T17:16:13.218Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9wgh-vjj7-7433","url":"https://github.com/advisories/GHSA-9wgh-vjj7-7433","licence":"CC-BY-4.0","modified":"2023-11-08T04:03:39.222Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2020-0073","url":"https://rustsec.org/advisories/RUSTSEC-2020-0073.html","licence":"CC0-1.0","modified":"2023-11-08T04:03:39.222Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-35916","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35916","licence":"Public domain","modified":"2026-06-17T03:14:35.987Z"}],"updatedAt":"2026-11-25T22:57:56.652Z","epss":{"score":0.00389,"percentile":0.35097,"date":"2026-12-02T12:00:21.000Z"}}