Steveukx git-js
simple-git unsafe-operation guard does not block trailer command configuration
simple-git, an interface for running git commands in any node.js application, enables applications to execute Git operations from JavaScript. From 3.15.0 until 4.0.1, the default blockUnsafeOperationsPlugin does not classify trailer.<token>.cmd as unsafe configuration. An application that passes attacker-controlled values through SimpleGitOptions.config or inline -c arguments can therefore allow Git to invoke an attacker-selected shell command when git interpret-trailers processes the configured trailer. The command executes with the operating-system identity and permissions of the Node.js process. This issue is fixed in 4.0.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 3.15.0, < 4.0.1
Fixed in 4.0.1
Mitigation
Upgrade git-js to 4.0.1 or later.
References
- Vendor advisory github.com/steveukx/git-js/security/advisories…
- Patch github.com/steveukx/git-js/pull/1198
- Patch github.com/steveukx/git-js/commit/d762810c13b3…
1 more
- Release notes github.com/steveukx/git-js/releases/tag/simple…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.