Skip to content

GHSA-54xq-cgqr-rpm3

sharp vulnerability in libwebp dependency CVE-2023-4863

High npm
Severity
7.8 / 10
High · CVSS 3.1
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
—
Not classified
Fix
0.32.6
Upgrade sharp to this version or later

Description

Overview

sharp uses libwebp to decode WebP images and versions prior to the latest 0.32.6 are 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"] });

Affected versions

npm

PackageVulnerableFixed in
sharp
< 0.32.6
0.32.6

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

sharp npm → 0.32.6

npm
npm install sharp@0.32.6
yarn
yarn add sharp@0.32.6
pnpm
pnpm add sharp@0.32.6

Severity breakdown

CVSS 3.1 7.8

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

References

Timeline

  1. Published
AdvisorySeverityWhy it's related
GHSA-wq5f-xc86-pv6w
sharp : Vulnerability in librsvg dependency CVE-2026-96889
High Also affects sharp
GHSA-rgj7-g3m4-5g8c
sharp: Vulnerabilities in libheif: GHSA-g89c-p67h-r497 and GHSA-2jg2-4ch7-h545
High Also affects sharp
GHSA-f88m-g3jw-g9cj
sharp inherited vulnerabilities in libvips: CVE-2026-33327, CVE-2026-33328, CVE-2026-35590, CVE-2026-35591
High Also affects sharp
GHSA-gp95-ppv5-3jc5
sharp vulnerable to Command Injection in post-installation over build environment
Medium Also affects sharp
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor