GitHub Advisoryadvisory · crates.io
GHSA-9q78-27f3-2jmh webp crate may expose memory contents when encoding an image
MEDIUM
Official page ↗
- Ecosystem
- crates.io
- Packages
- webp
- Severity
- Moderate
- CVSS vector
- CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U
- Weaknesses
- CWE-125
- Reviewed
- 2025-08-29
Affected packages
• crates.io webp: < 0.3.1 → fixed in 0.3.1
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.
Related
Weakness · CWE (1)
- CWE-125 Out-of-bounds Read weakness