{"cve":"CVE-2022-29256","nvd":{"published":"2022-05-25T22:15:08.307","modified":"2026-06-17T04:39:55.977","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.7},"cwes":["CWE-78","CWE-77"],"references":["https://github.com/lovell/sharp/commit/a6aeef612be50f5868a77481848b1de674216f0c","https://github.com/lovell/sharp/security/advisories/GHSA-gp95-ppv5-3jc5","https://github.com/lovell/sharp/commit/a6aeef612be50f5868a77481848b1de674216f0c","https://github.com/lovell/sharp/security/advisories/GHSA-gp95-ppv5-3jc5"],"products":["sharp_project:sharp"],"source":"nvd","synced_at":"2026-10-19T21:31:59.322382750+00:00"},"epss":{"cve":"CVE-2022-29256","score":0.00385,"percentile":0.32611,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-gp95-ppv5-3jc5","url":"https://osv.dev/vulnerability/GHSA-gp95-ppv5-3jc5","summary":"sharp vulnerable to Command Injection in post-installation over build environment","modified":"2023-11-08T04:09:12.597610Z","packages":[{"ecosystem":"npm","name":"sharp","purl":"pkg:npm/sharp","ranges":["<0.30.5"],"fixed":["0.30.5"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}