GHSA-v8gq-5grq-9728
HIGHmozjpeg DecompressScanlines::read_scanlines is Unsound
This issue and vector is similar to RUSTSEC-2020-0029 of rgb crate which mozjpeg depends on.
Affected versions of mozjpeg crate allow creating instances of any type T from bytes,
and do not correctly constrain T to the types for which it is safe to do so.
Examples of safety violation possible for a type T:
Tcontains a reference type, and it constructs a pointer to an invalid, arbitrary memory address.Trequires a safety and/or validity invariant for its construction that may be violated.
The issue was fixed in 0.8.19 by using safer types and involving rgb dependency bump.
- Published
- 4 Jul 2020
- Last modified
- 8 Nov 2023
- Also known as
- RUSTSEC-2020-0165
- Sources
- OSVJSONOSV RUSTSEC-2020-0165JSON
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | mozjpeg | < 0.8.19 | 0.8.19 |
| OSV | crates.io | mozjpeg | >= 0.0.0-0, < 0.8.19 | 0.8.19 |
References
- https://github.com/ImageOptim/mozjpeg-rust/issues/10 · WEB, REPORT
- https://github.com/ImageOptim/mozjpeg-rust · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2020-0165.html · WEB, ADVISORY
- https://crates.io/crates/mozjpeg · PACKAGE
- https://github.com/kornelski/rust-rgb/issues/35 · REPORT
- https://rustsec.org/advisories/RUSTSEC-2020-0029.html · ADVISORY
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 4 Jul 2020)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 16 Sep 2022)