CVE-2025-66219: Willitmerge Willitmerge Has A Command Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-j9wj-m24m-7jj6
CWE-77
Published
Advisory Summary

CVE-2025-66219 is a MODERATE willitmerge has a command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Willitmerge libraries in the npm ecosystem. The issue involves willitmerge has a command injection vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2025-66219 at a Glance

CVE Identifier CVE-2025-66219
GHSA Identifier GHSA-j9wj-m24m-7jj6
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Willitmerge
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-66219

To remediate this vulnerability, upgrade all affected Willitmerge dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

willitmerge fixed: Latest secure release
npm install willitmerge@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls willitmerge

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-66219, inspect your project dependencies using npm:

npm ls willitmerge

Analyze the terminal output to locate any version of Willitmerge 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 willitmerge 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 Willitmerge, 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

willitmerge describes itself as a command line tool to check if pull requests are mergeable. There is a Command Injection vulnerability in version `willitmerge@0.2.1`. Resources: * Project's GitHub source code: https://github.com/shama/willitmerge/ * Project's npm package: https://www.npmjs.com/package/willitmerge ## Background on exploitation Reporting a Command Injection vulnerability in `willitmerge` npm package. A security vulnerability manifests in this package due to the use of insecure child process execution API (`exec`) to which it concateanes user input, whether provided to the command-line flag, or is in user control in the target repository. ## Exploit ### POC 1 1. Install `willitmerge` 2. Run it with the following command ```sh willitmerge --verbose --remote "https://github.com/lirantal/npq.git; touch /tmp/hel" ``` 3. Confirm the file `/tmp/hel` is created on disk ### GitHub-sourced attack vector [Lines 189-197](https://github.com/shama/willitmerge/blob/2fe91d05191fb05ac6da685828d109a3a5885028/lib/willitmerge.js#L189-L197) in `lib/willitmerge.js` pass user input controlled by repository collaborators into the git command: ```js var cmds = [ 'git checkout -b ' + branch + ' ' + that.options.remote + '/' + iss.base.ref, 'git remote add ' + branch + ' ' + gitUrl, 'git pull ' + branch + ' ' + iss.head.ref, 'git reset --merge HEAD', 'git checkout ' + origBranch, 'git branch -D ' + branch, 'git remote rm ' + branch ]; ``` Users creating malicious branch names such as `;{echo,hello,world}>/tmp/c` This is a similar attack vector to that which was reported for the [pullit vulnerability (https://security.snyk.io/vuln/npm:pullit:20180214) # Author Liran Tal

CVE-2025-66219 Affected Willitmerge Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
willitmerge
npm
≤ 0.2.1

References

Frequently Asked Questions

What is CVE-2025-66219?
CVE-2025-66219 is a security vulnerability in Willitmerge involving willitmerge has a Command Injection vulnerability under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Willitmerge versions are affected?
Affected versions include releases prior to current release patches across affected packages: willitmerge.
What version fixes CVE-2025-66219?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is willitmerge affected?
Yes, willitmerge is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-66219?
CVE-2025-66219 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (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.).
How can I check npm dependencies for CVE-2025-66219?
Run the dependency tree command: 'npm ls willitmerge'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j9wj-m24m-7jj6",
  "modified" : "2025-12-01T16:06:54Z",
  "published" : "2025-11-26T22:09:27Z",
  "aliases" : [ "CVE-2025-66219" ],
  "summary" : "willitmerge has a Command Injection vulnerability",
  "details" : "willitmerge describes itself as a command line tool to check if pull requests are mergeable. There is a Command Injection vulnerability in version `willitmerge@0.2.1`.\n\nResources: \n * Project's GitHub source code: https://github.com/shama/willitmerge/\n * Project's npm package: https://www.npmjs.com/package/willitmerge\n\n## Background on exploitation\n\nReporting a Command Injection vulnerability in `willitmerge` npm package.\n\nA security vulnerability manifests in this package due to the use of insecure child process execution API (`exec`) to which it concateanes user input, whether provided to the command-line flag, or is in user control in the target repository.\n\n## Exploit \n\n### POC 1\n\n1. Install `willitmerge`\n2. Run it with the following command\n\n```sh\nwillitmerge --verbose --remote \"https://github.com/lirantal/npq.git; touch /tmp/hel\"\n```\n\n3. Confirm the file `/tmp/hel` is created on disk\n\n### GitHub-sourced attack vector\n\n[Lines 189-197](https://github.com/shama/willitmerge/blob/2fe91d05191fb05ac6da685828d109a3a5885028/lib/willitmerge.js#L189-L197) in `lib/willitmerge.js`\npass user input controlled by repository collaborators into the git command:\n\n```js\n  var cmds = [\n    'git checkout -b ' + branch + ' ' + that.options.remote + '/' + iss.base.ref,\n    'git remote add ' + branch + ' ' + gitUrl,\n    'git pull ' + branch + ' ' + iss.head.ref,\n    'git reset --merge HEAD',\n    'git checkout ' + origBranch,\n    'git branch -D ' + branch,\n    'git remote rm ' + branch\n  ];\n```\n\nUsers creating malicious branch names such as `;{echo,hello,world}>/tmp/c`\n\nThis is a similar attack vector to that which was reported for the [pullit vulnerability (https://security.snyk.io/vuln/npm:pullit:20180214)\n\n# Author\n\nLiran Tal",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "willitmerge"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/shama/willitmerge/security/advisories/GHSA-j9wj-m24m-7jj6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66219"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/shama/willitmerge"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/shama/willitmerge/blob/2fe91d05191fb05ac6da685828d109a3a5885028/lib/willitmerge.js#L189-L197"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-11-26T22:09:27Z",
    "nvd_published_at" : "2025-11-29T02:15:52Z"
  }
}