Vulnerabilities in pkg:npm/interactive-git-checkout
PACKAGECVE-2025-59046 is a CRITICAL (CVSS 9.8) interactive-git-checkout has a command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Interactive git checkout libraries in the npm ecosystem. The issue involves interactive-git-checkout has a command injection vulnerability. Remediation is available in the latest vendor maintenance releases.
pkg:npm/interactive-git-checkout
Vulnerability advisories affecting package pkg:npm/interactive-git-checkout. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-4wcm-7hjf-6xw5 | CVE-2025-59046 | CRITICAL | interactive-git-checkout has a Command Injection vulnerability |
CVE-2025-59046 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-59046
To remediate this vulnerability, upgrade all affected Interactive git checkout dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install interactive-git-checkout@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls interactive-git-checkout
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-59046, inspect your project dependencies using npm:
npm ls interactive-git-checkout
Analyze the terminal output to locate any version of Interactive git checkout in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls interactive-git-checkout command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Interactive git checkout, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-59046 Affected Interactive git checkout Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
interactive-git-checkout
|
npm |
≤ 1.1.4
|
|
References
Frequently Asked Questions
What is CVE-2025-59046?
Which Interactive git checkout versions are affected?
What version fixes CVE-2025-59046?
Is interactive-git-checkout affected?
What is the CVSS score of CVE-2025-59046?
What CWE is associated with CVE-2025-59046?
How can I check npm dependencies for CVE-2025-59046?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4wcm-7hjf-6xw5",
"modified" : "2025-09-10T21:37:00Z",
"published" : "2025-09-10T21:37:00Z",
"aliases" : [ "CVE-2025-59046" ],
"summary" : "interactive-git-checkout has a Command Injection vulnerability",
"details" : "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`.\n\nResources: \n * Project's npm package: https://www.npmjs.com/package/interactive-git-checkout\n \n## Command Injection Vulnerability\n\nThe `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.\n\nThe following vulnerable code snippets demonstrates the issue:\n\n```js\nconst { exec: execCb } = require('child_process');\nconst { promisify } = require('util');\n\nconst exec = promisify(execCb);\n\nmodule.exports = async (targetBranch) => {\n const { stdout, stderr } = await exec(`git checkout ${targetBranch}`);\n process.stderr.write(stderr);\n process.stdout.write(stdout);\n};\n```\n\n## Exploit Proof of Concept\n\n1. Install the `interactive-git-checkout` package (as suggested by the package's README):\n\n```bash\nnpm install --global interactive-git-checkout\n```\n\n2. Run the executable exposed by the installed package:\n\n```bash\n$ igc\n```\n\n3. When prompted, enter the following branch name:\n\n```bash\nhello ; echo 'Command Injection Vulnerability Exploited!' > /tmp/command-injection.txt; #\n```\n\n## Vulnerable versions\n\nAll versions of interactive-git-checkout are vulnerable to this issue, up to and including to the latest version of `1.1.4`.\n\n# Author\n\nLiran Tal",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "interactive-git-checkout"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.1.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ninofiliu/interactive-git-checkout/security/advisories/GHSA-4wcm-7hjf-6xw5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59046"
}, {
"type" : "WEB",
"url" : "https://github.com/ninofiliu/interactive-git-checkout/commit/8dd832dd302af287a61611f4f85e157cd1c6bb41"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ninofiliu/interactive-git-checkout"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-10T21:37:00Z",
"nvd_published_at" : "2025-09-09T23:15:37Z"
}
}