Description
The package simple-git before 3.3.0 are vulnerable to Command Injection via argument injection. When calling the .fetch(remote, branch, handlerFn) function, both the remote and branch parameters are passed to the git fetch subcommand. By injecting some git options it was possible to get arbitrary command execution.
Remediation
References
https://github.com/steveukx/git-js/pull/767
https://github.com/steveukx/git-js/releases/tag/simple-git%403.3.0
https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2421245
https://snyk.io/vuln/SNYK-JS-SIMPLEGIT-2421199
Related Vulnerabilities
CVE-2021-34083 Vulnerability in npm package google-it
CVE-2021-46708 Vulnerability in npm package swagger-ui
CVE-2021-21615 Vulnerability in maven package org.jenkins-ci.main:jenkins-core
CVE-2016-3506 Vulnerability in maven package com.oracle:ojdbc7
CVE-2022-20612 Vulnerability in maven package org.jenkins-ci.main:jenkins-core