Skip to content

GHSA-wq5f-xc86-pv6w CVE-2026-114111

sharp : Vulnerability in librsvg dependency CVE-2026-96889

High npm
Severity
8.9 / 10
High · CVSS 4.0
Exploit chance (EPSS)
0.13%
Chance of exploitation in the next 30 days. Higher than 2.49% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-416 Use After Free
CWE-1395 Dependency on Vulnerable Third-Party Component
Fix
0.35.5
Upgrade sharp to this version or later

Description

Impact

A memory-related vulnerability has been discovered and fixed in the upstream librsvg dependency. When certain runtime-specific conditions apply, this vulnerability can lead to possible remote code execution (RCE) on glibc-based Linux.

Patches

Using prebuilt binaries provided by sharp?

Most people rely on the prebuilt binaries provided by sharp.

Please upgrade sharp to the latest version, currently 0.35.5, which provides librsvg 2.63.2.

Using a globally-installed librsvg?

Please ensure you are using the latest librsvg 2.63.2.

Workarounds

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

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

To avoid RCE, ensure you are using a node executable binary compiled as a Position Independent Executable (PIE). Most Linux package managers already use this security-hardening feature however be warned that the "official" Node.js binaries do not. 1

Affected versions

npm

PackageVulnerableFixed in
sharp
< 0.35.5
0.35.5
sharp
< 0.35.5
0.35.5

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.35.5

npm
npm install sharp@0.35.5
yarn
yarn add sharp@0.35.5
pnpm
pnpm add sharp@0.35.5

Severity breakdown

CVSS 4.0 8.9

CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Attack vector
Local
Attack complexity
Low
Attack requirements
Present
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
High
Integrity (vulnerable system)
High
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
High
Integrity (subsequent systems)
High
Availability (subsequent systems)
High

Weakness

CWE-416: Use After Free

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.

How to prevent it
  • Architecture and Design: Choose a language that provides automatic memory management.
  • Implementation: When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.

CWE-1395: Dependency on Vulnerable Third-Party Component

The product has a dependency on a third-party component that contains one or more known vulnerabilities.

How to prevent it
  • Requirements, Policy: In some industries such as healthcare [REF-1320] [REF-1322] or technologies such as the cloud [REF-1321], it might be unclear about who is responsible for applying patches for third-party vulnerabilities: the vendor, the operator/customer, or a separate service. Clarifying roles and responsibilities can be important to minimize confusion or unnecessary delay when third-party vulnerabilities are disclosed.
  • Requirements: Require a Bill of Materials for all components and sub-components of the product. For software, require a Software Bill of Materials (SBOM) [REF-1247] [REF-1311].
  • Architecture and Design, Implementation, Integration, Manufacturing: Maintain a Bill of Materials for all components and sub-components of the product. For software, maintain a Software Bill of Materials (SBOM). According to [REF-1247], "An SBOM is a formal, machine-readable inventory of software components and dependencies, information about those components, and their hierarchical relationships."
  • Operation, Patching and Maintenance: Actively monitor when a third-party component vendor announces vulnerability patches; fix the third-party component as soon as possible; and make it easy for operators/customers to obtain and apply the patch.
  • Operation, Patching and Maintenance: Continuously monitor changes in each of the product's components, especially when the changes indicate new vulnerabilities, end-of-life (EOL) plans, etc.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
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-54xq-cgqr-rpm3
sharp vulnerability in libwebp dependency CVE-2023-4863
High Also affects sharp
GHSA-gp95-ppv5-3jc5
sharp vulnerable to Command Injection in post-installation over build environment
Medium Also affects sharp
CVE-2026-109619
PHP has various global state that temporarily points into request memory.
Critical Known exploited Same weakness, CWE-416
CVE-2026-109618
PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort handling of the request.
Critical Known exploited Same weakness, CWE-416
GHSA-7mwm-ghpf-9vrm
Pillow: Double free in ImagingScaleAffine on calloc failure via Image.transform
High Same weakness, CWE-416
GHSA-4rr5-89j8-mwwm
Pillow: Heap use-after-free when encoding TIFF to an in-memory buffer
High Same weakness, CWE-416
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