Advisory

GHSA-9q78-27f3-2jmh

Also known as: RUSTSEC-2024-0443

Summary

webp crate may expose memory contents when encoding an image

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2025-08-29 20:30 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

webp

crates.io · All systems

Affected

  • introduced 0, fixed 0.3.1 (semver)

Fixed versions

0.3.1

Fix

  • Fixed version 0.3.1
    cargo update -p webp --precise 0.3.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences