CVE-2022-29080
Description
The npm-dependency-versions package through 0.3.0 for Node.js allows command injection if an attacker is able to call dependencyVersions with a JSON object in which pkgs is a key, and there are shell metacharacters in a value.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The npm-dependency-versions package up to version 0.3.0 contains a command injection flaw when unsanitized input is passed to the dependencyVersions function via the pkgs key.
Vulnerability
The npm-dependency-versions package through version 0.3.0 for Node.js allows command injection. The vulnerability exists in the package's exported dependencyVersions function, which fails to sanitize user-controlled input in the pkgs parameter before passing it to a command execution API. An attacker who can call dependencyVersions with a crafted JSON object where pkgs is a key containing shell metacharacters can inject arbitrary commands [1][3].
Exploitation
An attacker needs the ability to provide a JSON object with a pkgs key whose value contains shell metacharacters (e.g., `; ` ). A proof-of-concept demonstrates that calling dependencyVersions({"pkgs":["touch rce"]})` results in command execution [3]. No special network position or authentication is required if the attacker can supply the input to the function.
Impact
Successful exploitation results in arbitrary command execution on the system running the Node.js application that uses the vulnerable version of the npm-dependency-versions package. The attacker gains the privileges of the application process, potentially leading to full system compromise, data exfiltration, or further lateral movement.
Mitigation
As of the available references, no patched version has been released. The last version affected is 0.3.0 [1][2]. Users should avoid using the npm-dependency-versions package or ensure that untrusted input is never passed to the dependencyVersions function. No workaround is provided by the vendor, and the package does not appear to be actively maintained. The CVE is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
npm-dependency-versionsnpm | <= 0.3.0 | — |
Affected products
3- npm-dependency-versions/npm-dependency-versionsdescription
- Range: <=0.3.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-m7xq-8jp8-rj2cghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-29080ghsaADVISORY
- github.com/barneycarroll/npm-dependency-versions/issues/6ghsax_refsource_MISCWEB
- www.npmjs.com/package/npm-dependency-versionsghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.