{"id":"CVE-2022-25865","aliases":["CVE-2022-25865","GHSA-5875-m6jq-vf78","SNYK-JS-WORKSPACETOOLS-2421201"],"related":[],"kind":"vulnerability","state":"published","title":"Command Injection","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"The package workspace-tools before 0.18.4 is 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"El paquete workspace-tools versiones anteriores a 0.18.4, es vulnerable a una inyección de comandos por medio de la inyección de argumentos de git. Cuando es llamada a una función fetchRemoteBranch(remote: string, remoteBranch: string, cwd: string), los parámetros remote y remoteBranch pasan al subcomando git fetch de forma que pueden establecerse flags adicionales. Los flags adicionales pueden usarse para llevar a cabo una inyección de comandos","source":"nvd"}],"published":"2022-05-13T20:00:19.528Z","modified":"2026-07-08T06:49:42.022Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-77","CWE-88"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"0.18.4","status":"affected"}],"product":"workspace-tools","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.18.4"}],"ecosystem":"npm","package":"workspace-tools","purl":"pkg:npm/workspace-tools","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.18.4"}],"vendor":"microsoft","product":"workspace-tools","cpe":"cpe:2.3:a:microsoft:workspace-tools:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-WORKSPACETOOLS-2421201","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/microsoft/workspace-tools/commit/9bc7e65ce497f87e1f363fd47b8f802f3d3cd978","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/microsoft/workspace-tools/pull/103","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25865","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/microsoft/workspace-tools","tags":["package"],"sources":["ghsa"]}],"credits":["Alessio Della Libera of Snyk Research Team"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-25865","url":"https://www.cve.org/CVERecord?id=CVE-2022-25865","licence":"CVE Terms of Use","modified":"2024-09-16T17:19:17.377Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5875-m6jq-vf78","url":"https://github.com/advisories/GHSA-5875-m6jq-vf78","licence":"CC-BY-4.0","modified":"2026-07-08T06:49:42.022Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-25865","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25865","licence":"Public domain","modified":"2026-06-17T04:34:24.830Z"}],"updatedAt":"2026-11-25T22:58:11.711Z","epss":{"score":0.06694,"percentile":0.94053,"date":"2026-12-01T12:00:22.000Z"}}