CVE-2026-49987 Repomix: Command Injection (RCE) via `--remote-branch` Argument Injection
Attackers can execute arbitrary commands by injecting Git options via the remote branch argument in Repomix.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-49987?
CVE-2026-49987 is a high-severity command injection vulnerability in yamadashy repomix, published on 15 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Repomix is a tool that packs repositories into AI-friendly files. Prior to 1.14.1, src/core/git/gitCommand.ts execGitShallowClone passes the --remote-branch value directly to git fetch and git checkout without validation or --end-of-options, allowing --upload-pack or other Git option injection that bypasses validateGitUrl() dangerous parameter checks and can execute commands through local or SSH-style transports. This issue is fixed in version 1.14.1.
Weakness: CWE-88
Which versions are affected by CVE-2026-49987?
2 open source packages ship an affected version, including repomix. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
repomix npm | All versions | 1.14.1 |
repomix npm | All versions | 1.14.1 |
Products include Yamadashy Repomix.
How do I fix CVE-2026-49987?
Upgrade repomix to 1.14.1 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-49987 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49987 exists.
Other vulnerabilities in yamadashy repomix
Sources
Also known as GHSA-9mm9-rqhj-j5mx.