- What: VS Code-integrated configuration files are automatically executed in Codespaces when a user opens a repository or pull request.
- Impact: Opening a malicious repository or pull request could lead to unintended code execution within the Codespaces environment.
APPLICATION SECURITY VS Code Configs Expose GitHub Codespaces to Attacks VS Code-integrated configuration files are automatically executed in Codespaces when the user opens a repository or pull request. By Ionut Arghire | February 5, 2026 (8:41 AM ET) Flipboard Reddit Whatsapp Email The automatic execution of VS Code-integrated configuration files when opening a repository or pull request in GitHub Codespaces could lead to supply chain attacks, Orca Security reports. A cloud-hosted developer environment, Codespaces allows users to create a fully configured Visual Studio Code instance almost instantly, providing them with tight repository integration and container support. It allows developers to test code, review pull requests, and more, but also exposes them to attacks via repository-defined configuration files, Orca says. “Codespaces is essentially VS Code running in the cloud, backed by Ubuntu containers, with built-in GitHub authentication and repository integration. This means any VS Code feature that touches execution, secrets, or extensions can potentially be abused when attackers control the repository content,” the cybersecurity firm notes. The issue, it explains, is that Codespaces automatically respects all VS Code configurations when the user opens a repository or pull request, and even when they check a pull request from an existing Codespace environment. An attacker could include malicious commands in a JSON file in the .vscode/ folder and abuse the automation for their execution without user approval when an arbitrary folder is opened, Orca says. ADVERTISEMENT. SCROLL TO CONTINUE READING. Furthermore, the attacker can target Linux systems by embedding variables for the integrated terminal in another JSON file, which would result in the payload’s execution via bash. According to the cybersecurity firm, an attacker could also use the devcontainer.json file to embed arbitrary commands that would be executed after the container is initialized on a machine. These attack vectors, Orca says, could lead to the exfiltration of GitHub tokens, Codespaces secrets, and other secrets. The GitHub token, the security firm notes, allows read and write operations in the context of the victim user, but can also be abused to introduce malicious pull requests to public repositories. Orca also explains that the GitHub Codespaces RCE vector could be abused in supply chain attacks by forking public repositories, creating a malicious pull request that, when opened by a maintainer via Codespaces, leaks the maintainer’s GitHub token. The attacker could then push code as a verified maintainer, Orca explains. Furthermore, the security firm says, an attacker could create a malicious VS Code extension to mount an XSS attack and access local services via the ‘0.0.0.0 Day’ vulnerability disclosed in August 2024. Furthermore, “adversaries can use the exfiltrated GitHub token with hidden, undocumented APIs that will allow them to prompt paid, premium AI-models on behalf of the victim,” Orca says. The cybersecurity firm says it has reported the findings to Microsoft, which said the behavior is intentional. SecurityWeek has emailed Microsoft-owned GitHub for a statement on the matter and will update this article if the company responds. Related: Critical N8n Sandbox Escape Could Lead to Server Compromise Related: North Korean Hackers Target macOS Developers via Malicious VS Code Projects Related: Adobe ColdFusion Servers Targeted in Coordinated Campaign Related: ‘PackageGate’ Flaws Open JavaScript Ecosystem to Supply Chain Attacks WRITTEN BY Ionut Arghire Ionut Arghire is an international correspondent for SecurityWeek. More from Ionut Arghire SystemBC Infects 10,000 Devices After Defying Law Enforcement Takedown Critical N8n Sandbox Escape Could Lead to Server Compromise Cisco, F5 Patch High-Severity Vulnerabilities Orion Raises $32 Million for Data Security DockerDash Flaw in Docker AI Assistant Leads to RCE, Data Theft Cryptominers, Reverse Shells Dropped in Recent React2Shell Attacks Fresh SolarWinds Vulnerability Exploited in Attacks RADICL Raises $31 Million for vSOC Latest News Organizations Urged to Replace Discontinued Edge Devices Flickr Security Incident Tied to Third-Party Email System In Other News: Record DDoS, Epstein’s Hacker, ESET Product Vulnerabilities Living off the AI: The Next Evolution of Attacker Tradecraft Airrived Emerges From Stealth With $6.1 Million in Funding ‘DKnife’ Implant Used by Chinese Threat Actor for Adversary-in-the-Middle Attacks 5 Bills to Boost Energy Sector Cyber Defenses Clear House Panel Critical SmarterMail Vulnerability Exploited in Ransomware Attacks TRENDING Daily Briefing Newsletter Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts. Webinar: Identity Under Attack: Why Every Business Must Respond Now February 11, 2026 Attendees will walk away with guidance for how to build robust identity defenses, unify them under a consistent security model, and ensure business operations move quickly without compromise. Register Virtual Event: Ransomware Resilience & Recovery 2026 Summit February 25, 2026 SecurityWeek’s 2026 Ransomware Summit will discuss a roadmap for defending the enterprise, from mitigating root causes to mastering recovery, giving security teams the critical insights needed to navigate and neutralize today’s ransomware extortion threats. Submit PEOPLE ON THE MOVE Pennsylvania has named Andy Ritter as CISO and Jim Sipe as executive deputy CIO. Hayete Gallot has rejoined Microsoft as Executive Vice President, Security. Torq has appointed industry veteran John White as Field CISO. More People On The Move EXPERT INSIGHTS Living off the AI: The Next Evolution of Attacker Tradecraft Living off the AI isn’t a hypothetical but a natural continuation of the tradecraft we’ve all been defending against, now mapped onto assistants, agents, and MCP. (Etay Maor) Why We Can’t Let AI Take the Wheel of Cyber Defense The fastest way to squander the promise of AI is to mistake automation for assurance, and novelty for resilience. (Steve Durbin) The Upside Down is Real: What Stranger Things Teaches Us About Modern Cybersecurity To all those who are fighting the good fight in the world of cyber, keep collaborating to ensure our world never succumbs to the chaos of the Upside Down. (Nadir Izrael) Why Identity Security Must Move Beyond MFA By integrating identity threat detection with MFA, organizations can protect sensitive data, maintain operational continuity, and reduce risk exposure. (Torsten George) Forget Predictions: True 2026 Cybersecurity Priorities From Leaders Security leaders chart course beyond predictions with focus on supply chain, governance, and team efficiency. (Jennifer Leggio) Flipboard Reddit Whatsapp Email