Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. sharp
  4. ›
  5. GMS-2023-4343

GMS-2023-4343: sharp vulnerability in libwebp dependency CVE-2023-4863

November 16, 2023

Overview

sharp uses libwebp to decode WebP images and versions prior to the latest 0.32.6 is vulnerable to the high severity https://github.com/advisories/GHSA-j7hp-h8jx-5ppr.

Who does this affect?

Almost anyone processing untrusted input with versions of sharp prior to 0.32.6.

How to resolve this?

Using prebuilt binaries provided by sharp?

Most people rely on the prebuilt binaries provided by sharp.

Please upgrade sharp to the latest 0.32.6, which provides libwebp 1.3.2.

Using a globally-installed libvips?

Please ensure you are using the latest libwebp 1.3.2.

Possible workaround

Add the following to your code to prevent sharp from decoding WebP images.

sharp.block({ operation: ["VipsForeignLoadWebp"] });

References

  • github.com/advisories/GHSA-54xq-cgqr-rpm3
  • github.com/lovell/sharp/commit/dbce6fab795ca4250bda9b1ef502c1fdb7d4a30c
  • github.com/lovell/sharp/security/advisories/GHSA-54xq-cgqr-rpm3

Code Behaviors & Features

Detect and mitigate GMS-2023-4343 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.32.6

Fixed versions

  • 0.32.6

Solution

Upgrade to version 0.32.6 or above.

Source file

npm/sharp/GMS-2023-4343.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:03 +0000.