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

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.

Vendors: GitHub, npm.

Quick answers

Is CVE-2026-45033 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-45033 being exploited in the wild.
How severe is CVE-2026-45033?
High severity, with a CVSS score of 7.8, published 13 May 2026.
Which products and versions are affected?
GitHub Copilot CLI < 1.0.43, <= 1.0.42; @github/copilot (npm) <= 1.0.42, SEMVER:introduced=0,fixed=1.0.43.
Is there a fix for CVE-2026-45033?
Yes. @github/copilot (npm): upgrade to 1.0.43 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-45033 attacked?
It is attacked with local access, in a network appliance.
Am I affected by CVE-2026-45033?
Check whether you run GitHub Copilot CLI or @github/copilot (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

  • @github/copilot (npm): upgrade to 1.0.43 or later
    npm install @github/copilot@1.0.43

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

Identifiers

  • CVE-2026-45033
  • GHSA-9ccr-r5hg-74gf

Timeline

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.