Executive brief
The simple-git library, a popular tool for running Git commands within Node.js applications, is vulnerable to a flaw that allows attackers to execute arbitrary code on the host server. By providing specially crafted input to functions like 'clone', an attacker can bypass security filters to run malicious commands. This could lead to a full system takeover, data theft, or disruption of services.
Technical details
The vulnerability exists in simple-git versions prior to 3.36.0. While a previous fix blocked the '-c' Git option to prevent configuration injection, it failed to block the equivalent '--config' flag. An attacker who can control the options argument passed to functions such as 'clone' can inject '--config protocol.ext.allow=always'. By combining this with an 'ext::' protocol source, the attacker can execute arbitrary shell commands. This is classified as Improper Control of Generation of Code (CWE-94). The issue is resolved in version 3.36.0.
Affected products
- steveukx simple-git >=3.15.0, <3.36.0
Timeline
- 2026-03-07: disclosed: Vulnerability disclosed and introduced in tracking.
- 2026-04-24: advisory: Snyk published the advisory.
- 2026-04-25: patched: Fix released in version 3.36.0.