{"id":"GHSA-v8gq-5grq-9728","aliases":["RUSTSEC-2020-0165"],"status":"published","title":"mozjpeg DecompressScanlines::read_scanlines is Unsound","description":"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","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2020-07-04T12:00:00Z","modified":"2023-11-08T04:23:09Z","fixes":[{"ecosystem":"crates.io","package":"mozjpeg","fixed_in":["0.8.19"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"mozjpeg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.8.19"}]}]},{"source":"osv","ecosystem":"crates.io","package":"mozjpeg","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.8.19"}]}]},{"source":"osv","ecosystem":"crates.io","package":"mozjpeg","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.8.19"}]}]}],"references":[{"url":"https://github.com/ImageOptim/mozjpeg-rust/issues/10","tags":["web","report"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0165.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-v8gq-5grq-9728"},{"url":"https://github.com/ImageOptim/mozjpeg-rust","tags":["package"]},{"url":"https://crates.io/crates/mozjpeg","tags":["package"]},{"url":"https://github.com/kornelski/rust-rgb/issues/35","tags":["report"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0029.html","tags":["advisory"]}],"sources":{"ghsa":[{"id":"GHSA-v8gq-5grq-9728","title":"mozjpeg DecompressScanlines::read_scanlines is Unsound","description":"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\n","status":"published","published":"2022-09-16T21:03:43Z","modified":"2023-01-11T05:08:05Z","updated_at":"2026-11-02T14:36:13.23016Z"}],"osv":[{"id":"GHSA-v8gq-5grq-9728","title":"mozjpeg DecompressScanlines::read_scanlines is Unsound","description":"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\n","status":"published","published":"2022-09-16T21:03:43Z","modified":"2023-11-08T04:23:09.541378Z","updated_at":"2026-11-02T15:46:56.981655Z"},{"id":"RUSTSEC-2020-0165","title":"mozjpeg DecompressScanlines::read_scanlines is Unsound","description":"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","status":"published","published":"2020-07-04T12:00:00Z","modified":"2023-11-08T04:23:09.541378Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
