webp crate may expose memory contents when encoding an image
Moderate severity
GitHub Reviewed
Published
Aug 29, 2025
to the GitHub Advisory Database
•
Updated Aug 29, 2025
Description
Published to the GitHub Advisory Database
Aug 29, 2025
Reviewed
Aug 29, 2025
Last updated
Aug 29, 2025
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.
References