GHSA-54xq-cgqr-rpm3: Sharp Sharp Vulnerability Vulnerability
HIGHGHSA-54xq-cgqr-rpm3 is a HIGH (CVSS 7.8) sharp vulnerability vulnerability (General Security Weakness) affecting Sharp libraries in the npm ecosystem. The issue involves sharp vulnerability in libwebp dependency cve-2023-4863. Remediation is available by upgrading affected packages to version 0.32.6.
GHSA-54xq-cgqr-rpm3 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix GHSA-54xq-cgqr-rpm3
To remediate this vulnerability, upgrade all affected Sharp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install sharp@0.32.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls sharp
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-54xq-cgqr-rpm3, inspect your project dependencies using npm:
npm ls sharp
Analyze the terminal output to locate any version of Sharp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.32.6), your application is affected.
Note: The npm ls sharp command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Sharp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-54xq-cgqr-rpm3 Affected Sharp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sharp
|
npm |
< 0.32.6
|
0.32.6
|
References
Frequently Asked Questions
What is GHSA-54xq-cgqr-rpm3?
Which Sharp versions are affected?
What version fixes GHSA-54xq-cgqr-rpm3?
Is sharp affected?
What is the CVSS score of GHSA-54xq-cgqr-rpm3?
What CWE is associated with GHSA-54xq-cgqr-rpm3?
How can I check npm dependencies for GHSA-54xq-cgqr-rpm3?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-54xq-cgqr-rpm3",
"modified" : "2023-11-16T17:14:15Z",
"published" : "2023-11-16T17:14:15Z",
"aliases" : [ ],
"summary" : "sharp vulnerability in libwebp dependency CVE-2023-4863",
"details" : "## Overview\n\nsharp 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.\n\n## Who does this affect?\n\nAlmost anyone processing untrusted input with versions of sharp prior to 0.32.6.\n\n## How to resolve this?\n\n### Using prebuilt binaries provided by sharp?\n\nMost people rely on the prebuilt binaries provided by sharp.\n\nPlease upgrade sharp to the latest 0.32.6, which provides libwebp 1.3.2.\n\n### Using a globally-installed libvips?\n\nPlease ensure you are using the latest libwebp 1.3.2.\n\n## Possible workaround\n\nAdd the following to your code to prevent sharp from decoding WebP images.\n```js\nsharp.block({ operation: [\"VipsForeignLoadWebp\"] });\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "sharp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.32.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lovell/sharp/security/advisories/GHSA-54xq-cgqr-rpm3"
}, {
"type" : "WEB",
"url" : "https://github.com/lovell/sharp/commit/dbce6fab795ca4250bda9b1ef502c1fdb7d4a30c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lovell/sharp"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-11-16T17:14:15Z",
"nvd_published_at" : null
}
}