Skip to content

With a specially crafted WebP lossless file, libwebp may...

Unreviewed Published Sep 25, 2023 to the GitHub Advisory Database • Updated Nov 7, 2023

Package

No package listedSuggest a package

Affected versions

Unknown

Patched versions

Unknown

Description

With a specially crafted WebP lossless file, libwebp may write data out of bounds to the heap.

The ReadHuffmanCodes() function allocates the HuffmanCode buffer with a size that comes from an array of precomputed sizes: kTableSize. The color_cache_bits value defines which size to use.

The kTableSize array only takes into account sizes for 8-bit first-level table lookups but not second-level table lookups. libwebp allows codes that are up to 15-bit (MAX_ALLOWED_CODE_LENGTH). When BuildHuffmanTable() attempts to fill the second-level tables it may write data out-of-bounds. The OOB write to the undersized array happens in ReplicateValue.

References

Published by the National Vulnerability Database Sep 25, 2023
Published to the GitHub Advisory Database Sep 25, 2023
Last updated Nov 7, 2023

Severity

Critical
10.0
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2023-5129

GHSA ID

GHSA-hhrh-69hc-fgg7

Source code

No known source code

Dependabot alerts are not supported on this advisory because it does not have a package from a supported ecosystem with an affected and fixed version.

Learn more about GitHub language support

Checking history
See something to contribute? Suggest improvements for this vulnerability.