CVE-2022-29256 json
Possible vulnerability at 'npm install' time in sharp if an attacker has control over build environment
published 2022-05-25 4 y ago modified 2026-06-17 4 mo ago also GHSA-gp95-ppv5-3jc5 , EUVD-2022-6053
- cvss
- 6.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 32%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm sharp 0.30.5
- sharp_project sharp 0.30.5
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 18 mo ago
Exploit prediction
0.39% chance of exploitation in the next 30 days, higher than 32% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 4.6 | AV:L/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | sharp | <0.30.5 |
0.30.5 |
Affected products
- lovell sharp
Classification
References
-
github.com
/lovell/sharp/commit/a6aeef612be50f5868a77481848b1de674216f0c
web, patch, third-party-advisory
-
github.com
/lovell/sharp/security/advisories/GHSA-gp95-ppv5-3jc5
web, patch, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-29256
advisory
-
advisory.dw1.io
/54
web
-
github.com
/lovell/sharp
package
Sources
- CVE List CVE-2022-29256
- GitHub Advisory GHSA-gp95-ppv5-3jc5
- NVD CVE-2022-29256
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.