Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. get-npm-package-version
  4. ›
  5. CVE-2020-7795

CVE-2020-7795: Improper Neutralization of Special Elements used in a Command ('Command Injection')

August 3, 2022 (updated August 10, 2022)

The package get-npm-package-version before 1.0.7 is vulnerable to Command Injection via main function in index.js.

References

  • github.com/advisories/GHSA-4h66-vghf-xg5x
  • github.com/hoperyy/get-npm-package-version/blob/338a5882298eb2c2194538db41166cae13c39e03/index.js
  • github.com/hoperyy/get-npm-package-version/commit/40b1cf31a0607ea66f9e30a0c3af1383b52b2dec
  • github.com/hoperyy/get-npm-package-version/commit/49459d4a3ce68587d48ffa8dead86fc9ed58e965
  • nvd.nist.gov/vuln/detail/CVE-2020-7795
  • security.snyk.io/vuln/SNYK-JS-GETNPMPACKAGEVERSION-1050390

Code Behaviors & Features

Detect and mitigate CVE-2020-7795 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.0.7

Fixed versions

  • 1.0.7

Solution

Upgrade to version 1.0.7 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

Source file

npm/get-npm-package-version/CVE-2020-7795.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:13 +0000.