Repomix: Command Injection (RCE) via `--remote-branch` Argument Injection
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-88.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| yamadashy | repomix | before 1.14.1 | 1.14.1 | Patch available | CNA |
| — | repomix (npm) | before 1.14.1 | 1.14.1 | Patch available | GHSA-9mm9-rqhj-j5mx |
- repomix Vendoryamadashy Affected before 1.14.1 Fixed in 1.14.1 Patch available CNA
- repomix (npm) Vendor— Affected before 1.14.1 Fixed in 1.14.1 Patch available GHSA-9mm9-rqhj-j5mx
Remediation
- Fix · CNA repomix (yamadashy) Fixed in 1.14.1
- Fix · GHSA-9mm9-rqhj-j5mx repomix (npm) Fixed in 1.14.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-49987
- 2026-10-03 Alias added: GHSA-9mm9-rqhj-j5mx
References
More yamadashy Repomix vulnerabilities
- TI-2026-36820 Repomix: attach_packed_output can bypass file-read secret scanning for supported local files CVSS 4.0MEDIUM 6.8
Sources
- CVE-2026-49987 · CVE Program
- CVE-2026-49987 · NVD
- FIRST EPSS
- GHSA-9mm9-rqhj-j5mx · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences