GHSA-J9WJ-M24M-7JJ6
Vulnerability from github – Published: 2025-11-26 22:09 – Updated: 2025-12-01 16:06willitmerge 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
- Install
willitmerge - Run it with the following command
willitmerge --verbose --remote "https://github.com/lirantal/npq.git; touch /tmp/hel"
- Confirm the file
/tmp/helis created on disk
GitHub-sourced attack vector
Lines 189-197 in lib/willitmerge.js
pass user input controlled by repository collaborators into the git command:
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
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "willitmerge"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.2.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-66219"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": true,
"github_reviewed_at": "2025-11-26T22:09:27Z",
"nvd_published_at": "2025-11-29T02:15:52Z",
"severity": "MODERATE"
},
"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\u0027s GitHub source code: https://github.com/shama/willitmerge/\n * Project\u0027s 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 \u0027git checkout -b \u0027 + branch + \u0027 \u0027 + that.options.remote + \u0027/\u0027 + iss.base.ref,\n \u0027git remote add \u0027 + branch + \u0027 \u0027 + gitUrl,\n \u0027git pull \u0027 + branch + \u0027 \u0027 + iss.head.ref,\n \u0027git reset --merge HEAD\u0027,\n \u0027git checkout \u0027 + origBranch,\n \u0027git branch -D \u0027 + branch,\n \u0027git remote rm \u0027 + branch\n ];\n```\n\nUsers creating malicious branch names such as `;{echo,hello,world}\u003e/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",
"id": "GHSA-j9wj-m24m-7jj6",
"modified": "2025-12-01T16:06:54Z",
"published": "2025-11-26T22:09:27Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"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",
"type": "CVSS_V4"
}
],
"summary": "willitmerge has a Command Injection vulnerability"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.