GHSA-54xq-cgqr-rpm3 sharp vulnerability in libwebp dependency CVE-2023-4863

Not scored Published

Attackers can execute arbitrary code or cause denial of service by sending malicious WebP images to applications using the sharp library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-54xq-cgqr-rpm3?

GHSA-54xq-cgqr-rpm3 is a memory corruption vulnerability in sharp, published on 16 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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"] });

Which versions are affected by GHSA-54xq-cgqr-rpm3?

2 open source packages ship an affected version, including sharp.

PackageAffectedFixed in
sharp npmAll versions0.32.6
sharp npmAll versions0.32.6

How do I fix GHSA-54xq-cgqr-rpm3?

Upgrade sharp to 0.32.6 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is GHSA-54xq-cgqr-rpm3 being exploited?

There is no known exploitation of GHSA-54xq-cgqr-rpm3 in the wild and no public exploit code.

Sources

Is GHSA-54xq-cgqr-rpm3 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free