{"id":"CVE-2022-29256","published":"2022-05-25T21:20:12Z","modified":"2025-04-23T18:21:26Z","title":"Possible vulnerability at 'npm install' time in sharp if an attacker has control over build environment","vendor":"lovell","product":"sharp","tier":"tail","description":{"text":"sharp is an application for Node.js image processing. Prior to version 0.30.5, there is a possible vulnerability in logic that is run only at `npm install` time when installing versions of `sharp` prior to the latest v0.30.5. If an attacker has the ability to set the value of the `PKG_CONFIG_PATH` environment variable in a build environment then they might be able to use this to inject an arbitrary command at `npm install` time. This is not part of any runtime code, does not affect Windows users at all, and is unlikely to affect anyone that already cares about the security of their build environment. This problem is fixed in version 0.30.5.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00385,"percentile":0.33466,"provenance":"source"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"references":[{"url":"https://github.com/lovell/sharp/security/advisories/GHSA-gp95-ppv5-3jc5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/lovell/sharp/commit/a6aeef612be50f5868a77481848b1de674216f0c","tags":["x_refsource_MISC"]}],"priority":{"score":11.2,"factors":[{"name":"EPSS percentile","points":6.69},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"lovell","affectedVersions":[{"vendor":"lovell","product":"sharp","versions":["< 0.30.5"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-04-23T15:52:46.058192Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"sharp","vulnerableRanges":["<0.30.5"],"patched":["0.30.5"],"from":["GHSA-gp95-ppv5-3jc5"],"provenance":"source"}],"summary":{"text":"The sharp Node.js image processing library, before version 0.30.5, contains a command injection flaw in logic that runs only during npm install, where an attacker who can set the PKG_CONFIG_PATH environment variable in the build environment may be able to inject arbitrary commands; it does not affect runtime code or Windows installs. Exploitation requires local access with high privileges to control the build environment and user interaction in the form of running the install.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:56:57Z"},"euvd":{"id":"EUVD-2022-6053","exploited":false,"provenance":"source"}}