GHSA-9q78-27f3-2jmh webp crate may expose memory contents when encoding an image
MediumCVSS 4.6
- Published
- Updated
- Exploit status
- No public exploit known
Description
Affected versions of this crate did not check that the input slice passed to "webp::Encoder::encode() is large enough for the specified image dimensions.
If the input slice is too short, the library will read out of bounds of the buffer and encode other memory contents as an image, resulting in memory exposure or a segmentation fault.
The flaw was corrected in pull request #44 by always validating the input buffer size when constructing the encoder.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| crates.io webp(crates.io) | < 0.3.1; >= 0.0.0-0, < 0.3.1 | 0.3.1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| crates.io webp(crates.io) | < 0.3.1 | 0.3.1 |
| crates.io webp(crates.io) | >= 0.0.0-0, < 0.3.1 | 0.3.1 |
References
- github.com issue-tracking
- github.com patch
- github.com patch
- github.com product
- rustsec.org vendor-advisory
- crates.io product
- github.com