Possible vulnerability at 'npm install' time in sharp if an attacker has control over build environment (lovell sharp)

CVE-2022-29256
MEDIUM 6.5

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

VersionScoreVectorScored by
CVSS 3.1MEDIUM 6.5CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:HGitHub_M
CVSS 3.1MEDIUM 6.5CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:HNVD · security-advisories@github.com (Secondary)
CVSS 3.1MEDIUM 6.7CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:HNVD · nvd@nist.gov (Primary)
CVSS 2.0MEDIUM 4.6AV:L/AC:L/Au:N/C:P/I:P/A:PNVD · nvd@nist.gov (Primary)

Advisories

European references

Affected configurations (NVD CPE)

Affected products

ProductAffected versions
lovell · sharp
affected : < 0.30.5

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD