Possible vulnerability at 'npm install' time in sharp if an attacker has control over build environment (lovell sharp)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.39 % · percentile 35 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- Affected products
- lovell · sharp
- NVD 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.
Weaknesses (CWE)
- CWE-77 — Improper Neutralization of Special Elements used in a Command
- CWE-78 — Improper Neutralization of Special Elements used in an OS Command
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H | GitHub_M |
| CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | MEDIUM 6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H | NVD · nvd@nist.gov (Primary) |
| CVSS 2.0 | MEDIUM 4.6 | AV:L/AC:L/Au:N/C:P/I:P/A:P | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-gp95-ppv5-3jc5 — sharp vulnerable to Command Injection in post-installation over build environment
European references
- ENISA EUVD · EUVD-2022-6053
- GCVE · GCVE-0-2022-29256
Affected configurations (NVD CPE)
cpe:2.3:a:sharp_project:sharp:*:*:*:*:*:node.js:*:*< 0.30.5
Affected products
| Product | Affected versions |
|---|---|
| lovell · sharp | affected : < 0.30.5 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |