GHSA-4wcm-7hjf-6xw5
CRITICALinteractive-git-checkout has a Command Injection vulnerability
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.
interactive-git-checkoutnpmDescription
The npm package interactive-git-checkout is an interactive command-line tool that allows users to checkout a git branch while it prompts for the branch name on the command-line. It is available as an npm package and can be installed via npm install -g interactive-git-checkout.
Resources:
- Project's npm package: https://www.npmjs.com/package/interactive-git-checkout
Command Injection Vulnerability
The interactive-git-checkout tool is vulnerable to a command injection vulnerability because it passes the branch name to the git checkout command using the Node.js child process module's exec() function without proper input validation or sanitization.
The following vulnerable code snippets demonstrates the issue:
const { exec: execCb } = require('child_process');
const { promisify } = require('util');
const exec = promisify(execCb);
module.exports = async (targetBranch) => {
const { stdout, stderr } = await exec(`git checkout ${targetBranch}`);
process.stderr.write(stderr);
process.stdout.write(stdout);
};
Exploit Proof of Concept
- Install the
interactive-git-checkoutpackage (as suggested by the package's README):
npm install --global interactive-git-checkout
- Run the executable exposed by the installed package:
$ igc
- When prompted, enter the following branch name:
hello ; echo 'Command Injection Vulnerability Exploited!' > /tmp/command-injection.txt; #
Vulnerable versions
All versions of interactive-git-checkout are vulnerable to this issue, up to and including to the latest version of 1.1.4.
Author
Liran Tal
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | interactive-git-checkout | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for interactive-git-checkout. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Remediation status
No patched version of interactive-git-checkout has shipped for GHSA-4wcm-7hjf-6xw5 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Mitigate without a patch
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-4wcm-7hjf-6xw5 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-4wcm-7hjf-6xw5. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-4wcm-7hjf-6xw5 in your dependencies?
O3 detects GHSA-4wcm-7hjf-6xw5 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.