Junglewise Threat Intelligence

CVE-2026-45033: GitHub Copilot CLI arbitrary code execution via nested bare Git repository

CVE-2026-45033 · Severity: high · CVSS 7.8 · Published 2026-05-13

Vendors: GitHub, npm.

Executive brief

GitHub Copilot CLI is an AI-powered tool that assists developers with command-line operations. A security flaw allowed malicious code to run automatically on a user's computer if they interacted with a project containing a specially crafted, hidden Git folder. This could lead to unauthorized access to sensitive files, stolen credentials, or full system compromise.

Technical details

GitHub Copilot CLI versions 1.0.42 and earlier are vulnerable to arbitrary code execution due to Git's automatic discovery of bare repositories during directory traversal. An attacker can place a malicious bare repository (e.g., in a vendor or hidden subdirectory) within a project and configure executable Git settings such as 'core.fsmonitor', 'core.hookspath', or 'diff.external'. When the Copilot CLI agent performs routine Git operations like 'status' or 'diff' that traverse these directories, Git auto-discovers the malicious configuration and executes the embedded shell commands. The vulnerability is mitigated in version 1.0.43 by setting 'safe.bareRepository=explicit' via environment variables to disable automatic discovery.

Affected products

  • GitHub Copilot CLI <= 1.0.42

Timeline

  • 2026-05-06: disclosed
  • 2026-05-11: advisory
  • 2026-05-11: patched

References

Related threats