# CVE-2026-49987: yamadashy Repomix argument injection in execGitShallowClone

Source: https://junglewise.ai/threats/cve-2026-49987-yamadashy-repomix-argument-injection-in-execgitshallowclone  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-15. Updated: 2026-07-15  
License: CC BY 4.0 with a link back

CVE-2026-49987 · Severity: high · CVSS 8.8 · Published 2026-07-15

Repomix, a tool used to package source code repositories for use with AI models, is vulnerable to a security flaw that allows attackers to execute malicious commands. By providing a specially crafted branch name, an attacker can trick the tool into running unauthorized code on the user's system or build server. This could lead to a full system takeover, theft of sensitive data, or compromise of automated software delivery pipelines.

Technologies: [repomix (npm)](https://junglewise.ai/threats/technologies/repomix). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-49987 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-49987 being exploited in the wild.

**How severe is CVE-2026-49987?** High severity, with a CVSS score of 8.8, published 15 July 2026.

**Which products and versions are affected?** repomix (npm) < 1.14.1, SEMVER:introduced=0,fixed=1.14.1.

**Is there a fix for CVE-2026-49987?** Yes. repomix (npm): upgrade to 1.14.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-49987 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-49987?** Check whether you run repomix (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- repomix (npm): upgrade to 1.14.1 or later

  ```sh
  npm install repomix@1.14.1
  ```


## Technical details

An argument injection vulnerability (CWE-88) exists in Repomix's `src/core/git/gitCommand.ts` within the `execGitShallowClone` function. The application passes the `--remote-branch` CLI value directly to `git fetch` and `git checkout` via `child_process.execFileAsync` without using the `--` or `--end-of-options` delimiters. An attacker can provide a branch name starting with a hyphen (e.g., `--upload-pack=/path/to/payload`) to inject Git options. When combined with local or SSH-style transports, this allows for arbitrary command execution, bypassing the `validateGitUrl()` security checks which were only applied to the repository URL. The issue is fixed in version 1.14.1 by validating branch names and using the `--end-of-options` flag.

## Affected products

- yamadashy repomix < 1.14.1

## Identifiers

- CVE-2026-49987
- GHSA-9mm9-rqhj-j5mx

## Timeline

- 2026-05-27: patched: Version 1.14.1 released
- 2026-05-27: advisory: GitHub Security Advisory GHSA-9mm9-rqhj-j5mx published
- 2026-07-15: disclosed: CVE-2026-49987 published to NVD

## References

- [https://github.com/yamadashy/repomix/commit/92bfa3193b5233a0d21beff929444153c088de82](https://github.com/yamadashy/repomix/commit/92bfa3193b5233a0d21beff929444153c088de82)
- [https://github.com/yamadashy/repomix/releases/tag/v1.14.1](https://github.com/yamadashy/repomix/releases/tag/v1.14.1)
- [https://github.com/yamadashy/repomix/security/advisories/GHSA-9mm9-rqhj-j5mx](https://github.com/yamadashy/repomix/security/advisories/GHSA-9mm9-rqhj-j5mx)

## Related threats

- [Repomix secret scanning bypass in MCP server tools](https://junglewise.ai/threats/cve-2026-49988-repomix-secret-scanning-bypass-in-mcp-server-tools)
