{"id":10920,"date":"2026-02-25T10:03:36","date_gmt":"2026-02-25T10:03:36","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2026\/02\/25\/github-copilot-exploited-to-perform-full-repository-takeover-via-passive-prompt-injection\/"},"modified":"2026-02-25T10:03:36","modified_gmt":"2026-02-25T10:03:36","slug":"github-copilot-exploited-to-perform-full-repository-takeover-via-passive-prompt-injection","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2026\/02\/25\/github-copilot-exploited-to-perform-full-repository-takeover-via-passive-prompt-injection\/","title":{"rendered":"GitHub Copilot Exploited to Perform Full Repository Takeover via Passive Prompt Injection"},"content":{"rendered":"<p>    GitHub Copilot Exploited to Perform Full Repository Takeover via Passive Prompt Injection<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A critical AI-driven vulnerability in GitHub Codespaces, dubbed RoguePilot, that enabled attackers to silently hijack a repository by embedding malicious instructions inside a GitHub Issue.<\/p>\n<p>The flaw, uncovered by researchers at the Orca Research Pod, exploits the seamless integration between GitHub Issues and the in-Codespaces Copilot AI agent, requiring no direct interaction from the attacker to trigger a full repository takeover.<\/p>\n<p>The vulnerability was responsibly disclosed to GitHub, and Microsoft has since patched it following coordinated remediation efforts with the Orca team.<\/p>\n<h2 class=\"wp-block-heading\" id=\"how-the-attack-works\"><strong>How the GitHub Copilot Attack Works<\/strong><\/h2>\n<p>RoguePilot is classified as a Passive Prompt Injection, a variant where malicious instructions are embedded inside data, content, or developer environments that a language model processes automatically.<\/p>\n<p>Unlike <a href=\"https:\/\/cybersecuritynews.com\/chatgpt-operator-prompt-injection\/\" target=\"_blank\" rel=\"noreferrer noopener\">traditional prompt injection<\/a> requiring a victim to directly interact with the AI, this attack is triggered the moment a developer opens a Codespace from a poisoned GitHub Issue. When a Codespace is launched from an issue context, GitHub Copilot is automatically fed the issue\u2019s description as an initial prompt, creating a direct injection pathway from untrusted user-controlled content into the AI agent\u2019s execution context.<\/p>\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgO8Db2rXNnuyw-iTbHWuFpjVQEu8Dw56BFMiu-DjsJ54wL3Nf7J_luLwjNRT-Y_yID31YMrA050H4q6shxwEyQD-06thCwuZCcZ11oWzJCeyk_EWazAtkzR8mOkVSiX6UdyUYUttGQaNylhldpXTOrEsMh2WcoCg8z4FVqviApWK6KuE9gc_KZwTRwqxEL\/s16000\/Attack%2520model.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">Attack Chain<\/figcaption><\/figure>\n<p>Researcher Roi Nisimi of Orca Security demonstrated the exploit chain by embedding hidden instructions inside a GitHub Issue using HTML comment tags (<code>&lt;!-- --&gt;<\/code>), a standard GitHub feature that renders content invisible to human readers but remains fully legible to Copilot when it processes the issue description.<\/p>\n<p>Once the Codespace was opened, Copilot silently complied with the injected instructions without generating any visible alert to the developer.<\/p>\n<p>The attack then proceeds through a three-stage exfiltration chain. First, the injected prompt instructs Copilot to execute <code>gh pr checkout 2<\/code> via its <code>run_in_terminal<\/code> tool, pulling in a pre-crafted pull request that contains a symbolic link named <code>1.json<\/code> pointing to <code>\/workspaces\/.codespaces\/shared\/user-secrets-envs.json<\/code> \u2014 the file housing the environment\u2019s <code>GITHUB_TOKEN<\/code>.<\/p>\n<p>Since Copilot\u2019s guardrails do not follow symbolic links, the agent reads the secrets file through the link using its <code>file_read<\/code> tool without triggering workspace boundary restrictions.<\/p>\n<p>Finally, Copilot is instructed to create a new JSON file, <code>issue.json<\/code>, with a <code>$schema<\/code> property pointing to an attacker-controlled server exploiting VS Code\u2019s default <code>json.schemaDownload.enable<\/code> setting, which automatically fetches remote JSON schemas via HTTP GET.<\/p>\n<p>The attacker appends the stolen <code>GITHUB_TOKEN<\/code> as a URL parameter in this schema request, resulting in silent out-of-band exfiltration of the privileged authentication token. With a valid <code>GITHUB_TOKEN<\/code> scope to the repository, the attacker obtains full read and write access \u2014 completing a stealthy repository takeover.<\/p>\n<p>Orca Security describes RoguePilot as a new class of AI-mediated supply chain attack, where an LLM\u2019s agentic capabilities, terminal access, file read\/write, and network-connected tooling are weaponized against the very developer the AI is meant to assist.<\/p>\n<p>The <a href=\"https:\/\/orca.security\/resources\/blog\/roguepilot-github-copilot-vulnerability\/?wvideo=a22z0xpd2a\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">vulnerability demonstrates that Copilot<\/a>, operating as an autonomous coding agent within Codespaces, cannot reliably distinguish between a developer\u2019s legitimate instruction and adversarial content embedded in a GitHub Issue or pull request.<\/p>\n<p>The attack required no special privileges, no code execution by the victim, and no social engineering beyond creating a malicious GitHub Issue placing it firmly within the reach of low-sophistication threat actors.<\/p>\n<p>Security experts note that this is a direct consequence of granting AI agents \u201cGod Mode\u201d permissions, tools, terminal access, and privileged tokens while the underlying model continues to operate on open-book logic that treats all processed text as potentially trustworthy.<\/p>\n<p><a href=\"https:\/\/orca.security\/resources\/blog\/roguepilot-github-copilot-vulnerability\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Orca\u2019s disclosure recommends that<\/a> vendors adopt fail-safe defaults across all LLM-integrated developer tooling: treat repository, issue, and pull request content as untrusted input; disable passive AI agent prompting from external data sources; set <code>json.schemaDownload.enable<\/code> to <code>false<\/code> by default; enforce strict symlink sandboxing within workspace boundaries; and enforce minimal-scope, short-lived token issuance for Codespaces environments.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 94%,rgb(169,184,195) 100%)\"><strong>Follow us on <a href=\"https:\/\/news.google.com\/publications\/CAAqMggKIixDQklTR3dnTWFoY0tGV041WW1WeWMyVmpkWEpwZEhsdVpYZHpMbU52YlNnQVAB?hl=en-IN&amp;gl=IN&amp;ceid=IN:en\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google News<\/a>, <a href=\"https:\/\/www.linkedin.com\/company\/cybersecurity-news\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">LinkedIn<\/a>, and <a href=\"https:\/\/x.com\/cyber_press_org\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">X<\/a> for daily cybersecurity updates. <a href=\"https:\/\/cybersecuritynews.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Contact us<\/a> to feature your stories.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/github-copilot-exploited\/\">GitHub Copilot Exploited to Perform Full Repository Takeover via Passive Prompt Injection<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Guru Baran<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/github-copilot-exploited\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitHub Copilot Exploited to Perform Full Repository Takeover via Passive Prompt Injection A critical AI-driven vulnerability in GitHub Codespaces, dubbed RoguePilot, that enabled attackers to silently hijack a repository by embedding malicious instructions inside a GitHub Issue. The flaw, uncovered by researchers at the Orca Research Pod, exploits the seamless integration between GitHub Issues and [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,648],"tags":[130],"class_list":["post-10920","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-vulnerability-news","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/10920"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=10920"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/10920\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=10920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=10920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=10920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}