Command Injection Affecting npm-dependency-versions package, versions *


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
1.56% (87th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-NPMDEPENDENCYVERSIONS-2624782
  • published12 Apr 2022
  • disclosed12 Apr 2022
  • creditFeng Xiao

Introduced: 12 Apr 2022

CVE-2022-29080  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

There is no fixed version for npm-dependency-versions.

Overview

npm-dependency-versions is an utility for determining the package versions at given points in time

Affected versions of this package are vulnerable to Command Injection via a call to the library object with a JSON object payload in which pkgs is a key, and there are shell metacharacters in the value.

PoC

const dependencyVersions = require("./index.js")
dependencyVersions({"pkgs":["|touch rce"]})

References

CVSS Scores

version 3.1