Advisory

RUSTSEC-2024-0443

Also known as: GHSA-9q78-27f3-2jmh

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

Not rated by the source.

Dates

Published
2024-09-06 12:00 UTC
Modified
2025-10-28 06:29 UTC

Affected packages and fixes

webp

crates.io · All systems

Affected

  • introduced 0.0.0-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: RustSec Advisory Database · CC0-1.0

Sources & licences