Heap-based Buffer Overflow Affecting webmproject/libwebp package, versions [0.5.0,1.3.2)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Social Trends
    Exploit Maturity
    Mature
    EPSS
    0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-UNMANAGED-WEBMPROJECTLIBWEBP-5918283
  • published 26 Sep 2023
  • disclosed 25 Sep 2023
  • credit Apple SEAR, The Citizen Lab

How to fix?

Upgrade webmproject/libwebp to version 1.3.2 or higher.

Overview

Affected versions of this package are vulnerable to Heap-based Buffer Overflow. This advisory has been marked deprecated in favor of CVE-2023-4863

An attacker can craft a special WebP lossless file that triggers the ReadHuffmanCodes() function to allocate 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().

Notes:

This is only exploitable if the color_cache_bits value defines which size to use.

This vulnerability was first published on Chrome as CVE-2023-4863.

Changelog:

2023-09-26: Initial advisory publication

2023-09-27: Advisory details updated, including CVSS, CWE, references

2023-09-27: CVE-2023-5129 rejected as a duplicate of CVE-2023-4863

2023-09-28: This advisory has been marked deprecated in favor of CVE-2023-4863

References

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
10 critical
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Changed
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

8.8 high
Expand this section

Red Hat

0 info