Packages / simple-git / Security
Command injection in simple-git
Affected releases · simple-git
- 3.x3.0.1 – 3.2.6Fixed in 3.3.0
- 2.x and older0.0.1 – 2.48.0No fix, no longer updated
On 3.x, the newest line:
npm install simple-git@3.3.0Every release on a timeline
Not affected
4.0.0 – 4.1.0
4 releases, latest
Affected
3.0.1 – 3.2.6
8 releases
Fixed
3.3.0 – 3.36.0
44 releases
Affected
2.0.0 – 2.48.0
63 releases
Affected
1.0.0 – 1.132.0
139 releases
Affected
0.0.1 – 0.17.0
20 releases
What happens
The package simple-git before 3.3.0 is 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.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.