Skip to content
OpenAdvisories
Medium GHSA-9q78-27f3-2jmh RUSTSEC-2024-0443

webp crate may expose memory contents when encoding an image

Published Aug 29, 2025 · Updated Sep 10, 2026 · Assigned by GHSA

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](https://github.com/jaredforth/webp/pull/44) by always validating the input buffer size when constructing the encoder.

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io webp < 0.3.1 0.3.1 GHSA-9q78-27f3-2jmh
crates.io webp >= 0.0.0-0, < 0.3.1 0.3.1 RUSTSEC-2024-0443

References