Skip to content
HighVulnerability

CVE-2026-49987: Repomix git option injection through --remote-branch value in shallow clone

Identifier
CVE-2026-49987
Published
Record updated
View JSON
Affected
  • repomix < 1.14.1
Fixed in
1.14.1
  • released May 26, 2026, 50 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.5%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .

Summary

Repomix, a tool that packs repositories into AI-friendly files, is affected prior to version 1.14.1. The execGitShallowClone function in src/core/git/gitCommand.ts passes the --remote-branch value directly to git fetch and git checkout without validation or --end-of-options, allowing Git option injection such as --upload-pack. This bypasses the dangerous parameter checks in validateGitUrl() and can execute commands through local or SSH-style transports.

Mitigation

This issue is fixed in version 1.14.1.