CVE-2025-66389: GitHub Copilot 1.372.0 Arbitrary File Access via Prompt Injection
GitHub Copilot version 1.372.0 contains a security flaw that allows the AI assistant to access files outside the workspace folder without explicit user permission. An attacker could potentially exploit this through indirect prompt injection—feeding malicious instructions into Copilot through compromised or attacker-controlled text—to read sensitive files on the user's system and exfiltrate their contents. The vulnerability stems from improper validation of file-handler URI parameters passed to the fetch_webpage function.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-552
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-22 / 2026-06-30
NVD description (verbatim)
GitHub Copilot 1.372.0 allows filesystem access outside of a workspace folder (without user approval) via a file-handler URI parameter to fetch_webpage. Therefore, exfiltration could occur if there is indirect prompt injection.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2025-66389 is an unrestricted resource access vulnerability (CWE-552) in GitHub Copilot 1.372.0 affecting the fetch_webpage handler. The vulnerability allows traversal beyond the intended workspace boundary due to insufficient validation of file-handler URI parameters. An attacker leveraging indirect prompt injection can craft prompts that cause Copilot to fetch and process files from arbitrary filesystem locations. No authentication or user interaction (beyond the normal use of Copilot) is required for exploitation, resulting in a CVSS 3.1 score of 7.5 (High severity, Network vector, with high confidentiality impact).
Business impact
This vulnerability creates a data exfiltration risk for organizations deploying GitHub Copilot in development environments. Sensitive project files, configuration data, API keys, credentials, or source code stored outside the active workspace could be read and potentially extracted if an attacker injects malicious prompts. The threat is particularly acute in scenarios where developers interact with Copilot using content from untrusted sources (e.g., code snippets from forums, pull requests, or documentation). Organizations must weigh the productivity benefits of Copilot against the need to isolate sensitive files and monitor Copilot's access patterns.
Affected systems
GitHub Copilot version 1.372.0 is affected. Organizations using this specific version in integrated development environments (IDEs) such as Visual Studio Code, Visual Studio, JetBrains IDEs, or Neovim are in scope. The vulnerability affects both individual developers and enterprise deployments. Verify your installed Copilot version against GitHub's release notes to confirm if your environment is running the vulnerable version.
Exploitability
Exploitability is moderate to high because it requires indirect prompt injection—feeding malicious instructions into Copilot via untrusted input—rather than direct attack vectors. An attacker cannot remotely trigger the vulnerability without a user actively using Copilot; however, the barrier is low. Compromised code samples, manipulated documentation, or crafted pull request comments could serve as injection vectors. The lack of user approval mechanisms for file access outside the workspace is the root enabler.
Remediation
Update GitHub Copilot to a patched version released after version 1.372.0. Consult GitHub's official release notes and security advisories to confirm the specific patched build. Additionally, implement defense-in-depth: restrict filesystem permissions for the IDE process where Copilot runs, isolate sensitive files and credentials outside developer workspaces, and educate developers about the risks of copy-pasting untrusted code into Copilot prompts.
Patch guidance
GitHub has released security updates to address this vulnerability. Upgrade GitHub Copilot through your IDE's extension manager (Visual Studio Code, Visual Studio) or JetBrains Marketplace. For enterprise environments, verify compatibility with your IDE version before rolling out updates. GitHub's official security advisory will specify the exact patched versions; consult it to confirm your target version is safe. Enable automatic updates where possible to reduce the window of exposure.
Detection guidance
Monitor IDE and Copilot logs for unusual file access patterns, particularly requests to fetch files outside the active workspace. Implement endpoint detection and response (EDR) rules to alert on unexpected file reads by IDE processes. Use code review processes to catch suspicious Copilot suggestions that reference files outside the project. Security information and event management (SIEM) can correlate access logs with Copilot interactions to identify exploitation attempts. Threat hunters should look for sequences of indirect prompt injection followed by file exfiltration attempts.
Why prioritize this
This vulnerability warrants high priority patching because it enables data exfiltration with minimal attacker effort and no user approval. The CVSS score of 7.5 reflects the high confidentiality impact and ease of exploitation via network vectors. Although the vulnerability requires prompt injection, its presence in a widely used AI coding assistant makes it a attractive target for attackers seeking to steal intellectual property, credentials, or source code from developers. Rapid patching reduces the window of risk.
Risk score, explained
The CVSS 3.1 score of 7.5 (High) reflects: Network attack vector (AV:N) due to the ability to inject prompts via untrusted content; low attack complexity (AC:L) because no special conditions or bypasses are needed; no privileges required (PR:N) and no user interaction beyond normal Copilot use (UI:N); unchanged scope (S:U); and high confidentiality impact (C:H) from unrestricted file access. Integrity and availability are not affected, making this a pure information disclosure risk. The score does not account for the indirect prompt injection requirement, which moderates practical exploitability but is assumed as part of the attack surface.
Frequently asked questions
Can this vulnerability be exploited without the user actively using Copilot?
No. Exploitation requires an attacker to inject malicious prompts that Copilot processes. The user must interact with Copilot by pasting or referencing content that contains the malicious instructions. However, this is a low bar—copy-pasting code from a compromised website or pulling a crafted pull request comment is sufficient.
What types of files are at risk?
Any file readable by the process running the IDE can be accessed, including configuration files, API keys stored in plaintext or environment files, SSH keys, database credentials, and source code outside the active workspace. The attacker's success depends on filesystem permissions and file locations accessible to the IDE process.
Does this affect GitHub Copilot for Business or only individual users?
The vulnerability affects GitHub Copilot version 1.372.0 regardless of license tier. Both individual and enterprise deployments using this version are at risk. Enterprise customers should prioritize patching and consider temporarily restricting Copilot's use on systems handling highly sensitive data until updates are deployed.
How is this different from typical prompt injection attacks?
This is an indirect prompt injection, meaning the attacker does not directly control the IDE or Copilot instance. Instead, they embed malicious instructions in content the developer will show to Copilot (code snippets, comments, etc.). The vulnerability is the unsafe handling of file URIs by Copilot itself, not a defect in the IDE.
This analysis is based on publicly available information current as of the publication and modification dates provided. Specific patch versions and availability should be verified against GitHub's official security advisory and release notes before deploying updates. The vulnerability details and remediation guidance are intended for security professionals and system administrators; they do not constitute legal or compliance advice. Organizations should conduct their own risk assessment based on their threat model, data sensitivity, and Copilot deployment architecture. Proof-of-concept code or weaponized exploits are not provided; responsible disclosure practices should be followed. SEC.co assumes no liability for damages resulting from reliance on this analysis. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-40425MEDIUMMacGregor VDR Admin File Access Vulnerability – MEDIUM Risk
- CVE-2026-45543MEDIUMNextcloud Forms Removed Collaborator Retains File Read Access
- CVE-2020-9695HIGHAdobe Acrobat Reader Out-of-Bounds Write RCE Vulnerability
- CVE-2026-10000HIGHChrome Sandbox Escape via Use-After-Free in Password Handling
- CVE-2026-10001HIGHChrome Sandbox Escape via PerformanceManager Use-After-Free
- CVE-2026-10002HIGHGoogle Chrome PDFium Use-After-Free Vulnerability (CVSS 8.8)
- CVE-2026-10003HIGHChrome Use-After-Free Code Execution Vulnerability Analysis
- CVE-2026-10006HIGHChrome WebAudio Race Condition Remote Code Execution