# CVE-2026-45033: GitHub Copilot CLI: Nested Bare Repository Can Execute Arbitrary Commands via core.fsmonitor

> A malicious nested bare git repository can trigger arbitrary command execution via git config keys during Copilot CLI operations.

- **Severity:** High 8.5 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 May 2026
- **Updated:** 13 May 2026
- **Also known as:** GHSA-9ccr-r5hg-74gf

## What is CVE-2026-45033?

CVE-2026-45033 is a high-severity command injection vulnerability in github copilot-cli, published on 13 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

GitHub Copilot CLI brings AI-powered coding assistance directly to your command line. Prior to 1.0.43, 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. 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. This vulnerability is fixed in 1.0.43.

Weakness: CWE-696 (Incorrect Behavior Order)

## Which versions are affected by CVE-2026-45033?

2 open source packages ship an affected version, including @github/copilot. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@github/copilot` | npm | All versions | 1.0.43 |
| `@github/copilot` | npm | All versions | 1.0.43 |

Products: Github Copilot-Cli.

## How do I fix CVE-2026-45033?

Upgrade @github/copilot to 1.0.43 or later.

## Is CVE-2026-45033 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45033 exists.

Public exploit code:

- CVE-2026-45033 PoC for Claude Code, not Github Copilot. Worked for Haiku 4.5. (github_poc): https://github.com/grassplatypus/cve-2026-45033-class

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-45033 and fix it if it is affected.

What it is: CVE-2026-45033 is a high-severity command injection vulnerability in github copilot-cli, published on 13 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45033 exists.

Affected packages and fixed versions:
- @github/copilot (npm): affected all versions; fixed in 1.0.43
- @github/copilot (npm): affected all versions; fixed in 1.0.43

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-45033/ (Markdown: https://insights.sbomify.com/CVE-2026-45033/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-45033
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-45033
- OSV: https://osv.dev/vulnerability/CVE-2026-45033

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-45033/
Summaries are generated and may contain mistakes; the official description above is the record.
