Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. repomix
  4. ›
  5. CVE-2026-49987

CVE-2026-49987: repomix Vulnerable to Command Injection (RCE) via `--remote-branch` Argument Injection

July 1, 2026

The --remote-branch CLI option in repomix is vulnerable to argument injection. User-supplied input is passed directly to git fetch and git checkout subprocesses via child_process.execFileAsync without sanitization, -- delimiters, or validation.

An attacker can inject arbitrary git command-line options. By injecting the --upload-pack option and specifying an SSH (git@...) or local (file://) remote URL, an attacker achieves arbitrary command execution with the privileges of the user running repomix. This bypasses the existing dangerousParams blocklist implemented in validateGitUrl().

References

  • github.com/advisories/GHSA-9mm9-rqhj-j5mx
  • github.com/yamadashy/repomix/security/advisories/GHSA-9mm9-rqhj-j5mx
  • nvd.nist.gov/vuln/detail/CVE-2026-49987

Code Behaviors & Features

Detect and mitigate CVE-2026-49987 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.14.1

Fixed versions

  • 1.14.1

Solution

Upgrade to version 1.14.1 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Source file

npm/repomix/CVE-2026-49987.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 13 Jul 2026 00:20:18 +0000.