GHSA-9q78-27f3-2jmh

Suggest an improvement
Source
https://github.com/advisories/GHSA-9q78-27f3-2jmh
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-9q78-27f3-2jmh/GHSA-9q78-27f3-2jmh.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-9q78-27f3-2jmh
Published
2025-08-29T20:30:04Z
Modified
2025-08-29T20:30:04Z
Severity
  • 4.6 (Medium) CVSS_V4 - 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 CVSS Calculator
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.

Database specific
{
    "nvd_published_at": null,
    "severity": "MODERATE",
    "cwe_ids": [
        "CWE-125"
    ],
    "github_reviewed_at": "2025-08-29T20:30:04Z",
    "github_reviewed": true
}
References

Affected packages

crates.io / webp

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.3.1