CVE-2022-25853: semver-tags is vulnerable to Command Injection via the getGitTagsRemote function
7.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.25917%
CWE
Published
2/6/2023
Updated
2/13/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| semver-tags | npm | <= 0.4.10 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability is clearly identified in the getGitTagsRemote function through multiple sources: 1) The GitHub advisory directly references line 21 of get-tags.js which contains the vulnerable command construction. 2) The code shows direct interpolation of the path parameter into a shell command without proper escaping (cp.exec('git ls-remote --tags "' + path + '"')). 3) The Snyk PoC demonstrates exploitation through manipulated path input. 4) CWE-77 classification confirms command injection pattern. Other functions like getGitTags and getSvnTags don't show the same unsanitized input pattern in the provided code snippets.