{"id":"GHSA-v8gq-5grq-9728","aliases":["GHSA-v8gq-5grq-9728","RUSTSEC-2020-0165"],"related":[],"kind":"vulnerability","state":"published","title":"mozjpeg DecompressScanlines::read_scanlines is Unsound","summary":"This issue and vector is similar to [RUSTSEC-2020-0029] of `rgb` crate which `mozjpeg` depends on.\n\nAffected versions of `mozjpeg` crate allow creating instances of any type `T` from bytes,\nand do not correctly constrain `T` to the types for which it is safe to do so.\n\nExamples of safety violation possible for a type `T`:\n\n* `T` contains a reference type, and it constructs a pointer to an invalid, arbitrary memory address.\n* `T` requires a safety and/or validity invariant for its construction that may be violated.\n\nThe issue was fixed in 0.8.19 by using safer types and involving `rgb` dependency bump.\n\n[RUSTSEC-2020-0029]: https://rustsec.org/advisories/RUSTSEC-2020-0029.html","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"This issue and vector is similar to [RUSTSEC-2020-0029] of `rgb` crate which `mozjpeg` depends on.\n\nAffected versions of `mozjpeg` crate allow creating instances of any type `T` from bytes,\nand do not correctly constrain `T` to the types for which it is safe to do so.\n\nExamples of safety violation possible for a type `T`:\n\n* `T` contains a reference type, and it constructs a pointer to an invalid, arbitrary memory address.\n* `T` requires a safety and/or validity invariant for its construction that may be violated.\n\nThe issue was fixed in 0.8.19 by using safer types and involving `rgb` dependency bump.\n\n[RUSTSEC-2020-0029]: https://rustsec.org/advisories/RUSTSEC-2020-0029.html","format":"markdown","source":"ghsa"}],"published":"2020-07-04T12:00:00.000Z","modified":"2023-11-08T04:23:09.541Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.8.19"}],"ecosystem":"crates.io","package":"mozjpeg","purl":"pkg:cargo/mozjpeg","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.8.19"}],"ecosystem":"crates.io","package":"mozjpeg","purl":"pkg:cargo/mozjpeg","source":"rustsec"}],"references":[{"url":"https://github.com/ImageOptim/mozjpeg-rust/issues/10","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/ImageOptim/mozjpeg-rust","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0165.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/mozjpeg","tags":["package"],"sources":["rustsec"]},{"url":"https://github.com/kornelski/rust-rgb/issues/35","tags":["report"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0029.html","tags":["advisory"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v8gq-5grq-9728","url":"https://github.com/advisories/GHSA-v8gq-5grq-9728","licence":"CC-BY-4.0","modified":"2023-11-08T04:23:09.541Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2020-0165","url":"https://rustsec.org/advisories/RUSTSEC-2020-0165.html","licence":"CC0-1.0","modified":"2023-11-08T04:23:09.541Z"}],"updatedAt":"2026-11-25T22:56:43.010Z"}