# CVE-2022-25865: Command Injection

- Severity: High 8.1 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 6.69%, higher than 94% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-05-13T20:00:19.528Z
- Modified: 2026-07-08T06:49:42.022Z
- Also known as: GHSA-5875-m6jq-vf78, SNYK-JS-WORKSPACETOOLS-2421201
- Weaknesses: CWE-77, CWE-88
- Assigned by: snyk

## Description

The package workspace-tools before 0.18.4 are vulnerable to Command Injection via git argument injection. When calling the fetchRemoteBranch(remote: string, remoteBranch: string, cwd: string) function, both the remote and remoteBranch parameters are passed to the git fetch subcommand in a way that additional flags can be set. The additional flags can be used to perform a command injection.

(As written by CVE List.)

## Affected

- workspace-tools: from unspecified before 0.18.4
- workspace-tools (npm): before 0.18.4
- microsoft workspace-tools: before 0.18.4

## Every score

- snyk: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://snyk.io/vuln/SNYK-JS-WORKSPACETOOLS-2421201> (exploit, third-party-advisory, web)
- <https://github.com/microsoft/workspace-tools/commit/9bc7e65ce497f87e1f363fd47b8f802f3d3cd978> (patch, third-party-advisory, web)
- <https://github.com/microsoft/workspace-tools/pull/103> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25865> (advisory)
- <https://github.com/microsoft/workspace-tools> (package)

## Sources

- CVE List: [CVE-2022-25865](https://www.cve.org/CVERecord?id=CVE-2022-25865), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-5875-m6jq-vf78](https://github.com/advisories/GHSA-5875-m6jq-vf78), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2022-25865](https://nvd.nist.gov/vuln/detail/CVE-2022-25865), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-25865 · Whole record: https://cve.day/CVE-2022-25865.json · Rebuilt by cve.day 2026-11-25T22:58:11.711Z
