Vulnerabilities in pkg:npm/@github/copilot
PACKAGECVE-2026-45033 is a HIGH (CVSS 7.8) nested bare repository can execute vulnerability (CWE-696: Incorrect Behavior Order) affecting GitHub Copilot CLI libraries in the npm ecosystem. The issue involves nested bare repository can execute arbitrary commands via core.fsmonitor. Remediation is available by upgrading affected packages to version 1.0.43.
pkg:npm/@github/copilot
Vulnerability advisories affecting package pkg:npm/@github/copilot. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9ccr-r5hg-74gf | CVE-2026-45033 | HIGH | GitHub Copilot CLI: Nested Bare Repository Can Execute Arbitrary Commands via core.fsmonitor |
| GHSA-g8r9-g2v8-jv6f | CVE-2026-29783 | HIGH | GitHub Copilot CLI Dangerous Shell Expansion Patterns Enable Arbitrary Code Execution |
CVE-2026-45033 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-45033
To remediate this vulnerability, upgrade all affected GitHub Copilot CLI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @github/copilot@1.0.43
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @github/copilot
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-45033, inspect your project dependencies using npm:
npm ls @github/copilot
Analyze the terminal output to locate any version of GitHub Copilot CLI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.43), your application is affected.
Note: The npm ls @github/copilot command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-696: Incorrect Behavior Order, where the product performs multiple related behaviors, but the behaviors are performed in the wrong order in ways that may produce resultant weaknesses. In GitHub Copilot CLI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-45033 Affected GitHub Copilot CLI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@github/copilot
|
npm |
< 1.0.43
|
1.0.43
|
References
Frequently Asked Questions
What is CVE-2026-45033?
Which GitHub Copilot CLI versions are affected?
What version fixes CVE-2026-45033?
Is @github/copilot affected?
What is the CVSS score of CVE-2026-45033?
What CWE is associated with CVE-2026-45033?
How can I check npm dependencies for CVE-2026-45033?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9ccr-r5hg-74gf",
"modified" : "2026-06-09T10:56:45Z",
"published" : "2026-05-11T16:16:06Z",
"aliases" : [ "CVE-2026-45033" ],
"summary" : "GitHub Copilot CLI: Nested Bare Repository Can Execute Arbitrary Commands via core.fsmonitor",
"details" : "## Summary\n\nA 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.\n\n## Details\n\nGit 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.\n\nThe 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`.\n\n### Attack Scenario\n\nAn attacker can exploit this by:\n\n1. Creating a bare git repository nested inside a seemingly normal project directory (e.g., `vendor/malicious.git/` or a deeply nested subdirectory)\n2. Configuring `core.fsmonitor` (or similar keys) in that bare repository to execute a malicious command\n3. 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\n\nThis can occur when:\n- The agent navigates into a subdirectory containing the buried bare repo\n- The agent runs `git status`, `git diff`, or other routine git commands\n- The agent uses tools like `grep` or `glob` that may trigger git operations in subdirectories\n\nPrior to the fix, the CLI had no protection against git auto-discovering bare repositories during directory traversal.\n\n## Impact\n\nAn attacker who can place a malicious bare repository inside a project — for example, through:\n- A pull request adding a directory that contains a bare repository\n- A compromised or malicious dependency that includes a bare repository\n- A cloned repository that already contains nested bare repositories\n\n— could achieve arbitrary code execution on the user's workstation whenever GitHub Copilot CLI performs git operations in or near the malicious directory.\n\nSuccessful exploitation could lead to data exfiltration, credential theft, file modification, or further system compromise.\n\n## Affected Versions\n\n- GitHub Copilot CLI versions prior to 1.0.42\n\n## Remediation and Mitigation\n\n### Fix\n\nThe 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.\n\n### User Actions\n\n1. **Upgrade** GitHub Copilot CLI to **1.0.43** or later.\n2. **Exercise caution** when working in repositories that contain nested bare git repositories.\n3. **Review** project directories for unexpected bare repositories, especially in `vendor/`, `third_party/`, or deeply nested subdirectories.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@github/copilot"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.43"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.42"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/github/copilot-cli/security/advisories/GHSA-9ccr-r5hg-74gf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45033"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/github/copilot-cli"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-696" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-11T16:16:06Z",
"nvd_published_at" : "2026-05-13T16:17:00Z"
}
}