The vulnerability is a classic command injection issue stemming from the use of child_process.exec (wrapped in a promise as execAsync) to execute git commands. Multiple API endpoints throughout server/routes/user.js and server/routes/git.js construct shell commands by directly embedding user-controlled input from request bodies and query parameters (e.g., gitName, gitEmail, file, branch, message).
The developers attempted to mitigate this by escaping double quotes, but this is insufficient as other shell metacharacters (like $() and backticks for command substitution) are still processed by the shell (/bin/sh by default in exec). This allows an attacker to inject and execute arbitrary commands on the server under the privileges of the Node.js process.
The patch addresses the root cause by replacing all instances of the unsafe execAsync with a new spawnAsync helper function. This new function uses child_process.spawn, which does not invoke a shell. Instead, it passes the command and its arguments as an array, effectively preventing any user-supplied data from being interpreted as shell commands. The widespread replacement of execAsync across numerous routes in the fixing commit indicates that the command injection vulnerability was systemic in the application's handling of git operations.