CVE-2022-25860: Remote code execution in simple-git
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.96628%
CWE
-
Published
1/26/2023
Updated
2/3/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| simple-git | npm | < 3.16.0 | 3.16.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper input sanitization in Git command argument handling. The commit diffs show added validations in block-unsafe-operations-plugin.ts for --upload-pack, --receive-pack, and -u flags, which were previously unsanitized. These methods directly accept user-controllable arguments that get passed to git CLI without proper validation in vulnerable versions. The advisory explicitly names these four methods as attack vectors, and the Snyk PoC demonstrates RCE through these endpoints. The patch adds validation checks specifically for these arguments in the plugin system that these methods utilize.