CVE-2022-29256
JavaScript vulnerability analysis and mitigation

Overview

The CVE-2022-29256 affects sharp, a Node.js image processing application. The vulnerability was discovered and disclosed on May 25, 2022, affecting versions prior to 0.30.5. The issue exists in the logic that runs during the npm install process, where an attacker with control over the PKG_CONFIG_PATH environment variable could potentially inject arbitrary commands during installation (GitHub Advisory).

Technical details

The vulnerability is related to command injection during the installation process. It specifically involves the handling of the PKG_CONFIG_PATH environment variable during the npm install operation. The issue received a CVSS v3.1 Base Score of 6.7 (Medium) with the vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H. The vulnerability is classified under CWE-78 (Improper Neutralization of Special Elements used in an OS Command) (NVD).

Impact

The vulnerability could potentially allow an attacker with control over the build environment to execute arbitrary commands during the package installation process. However, this only affects the installation process and not the runtime code. The impact is limited as it does not affect Windows users and primarily concerns environments where build environment security is already compromised (GitHub Advisory).

Mitigation and workarounds

The vulnerability was fixed in sharp version 0.30.5 with commit a6aeef6. The fix involves changing how the PKG_CONFIG_PATH is handled, passing it via environment variables rather than substitution. Users should upgrade to version 0.30.5 or later to address this vulnerability (GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23744CRITICAL9.8
  • JavaScriptJavaScript
  • @mcpjam/inspector
NoYesJan 16, 2026
CVE-2026-23735HIGH8.7
  • JavaScriptJavaScript
  • graphql-modules
NoYesJan 16, 2026
GHSA-gw32-9rmw-qwwwHIGH8.4
  • JavaScriptJavaScript
  • svelte
NoYesJan 16, 2026
CVE-2026-23745HIGH8.2
  • JavaScriptJavaScript
  • tar
NoYesJan 16, 2026
GHSA-38cw-85xc-xr9xMEDIUM6.8
  • JavaScriptJavaScript
  • @veramo/data-store
NoYesJan 16, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management