What to know: Microsoft tested the GitHub Copilot scenario in a controlled lab, not an observed attack. The underlying device-code phishing technique has been used in real campaigns. Only enter and approve a code for a sign-in you started yourself.
A Real GitHub Login Could Hand Attackers Your Copilot Access
A Microsoft simulation shows how an attacker’s sign-in request could expose code, saved sessions and an AI coding assistant—even when the victim uses GitHub’s real verification page.

Jump to a section
The GitHub address is correct. The sign-in page is genuine. The app name looks familiar. You approve the request—and someone else signs in.
In a scenario tested by Microsoft researchers, that single approval could reach beyond an account profile to private code, saved conversations and, under specific conditions, an AI coding assistant working on a developer’s computer. The unsettling part: the victim never needs to type a password into a fake website.
That is the trap at the heart of research published by Microsoft on November 17. In a controlled test, researchers examined how a familiar phishing technique could be used against GitHub Copilot CLI, a command-line AI coding assistant. Depending on the permissions and features available, their test account’s authorization opened a path to private repositories, saved sessions and, under specific conditions, an active assistant session.
The distinction matters: Microsoft says it has not observed these Copilot-specific outcomes in the wild. It has, however, reported real campaigns using the underlying device-code phishing technique. The study asks what happens when that established trick meets an assistant with access to a developer’s work.
How a real GitHub page can be part of the trap
Some applications cannot conveniently show a full sign-in page. Instead, they use a process called device authorization: the application displays a short code, and the user enters it on the service’s website to approve that application. GitHub documents this flow for tools such as command-line applications.
In the phishing version, the attacker starts the sign-in on their own device and sends the resulting code to the target. The message might claim to be from IT or ask the recipient to check a Copilot license. The person visits the real GitHub verification page and approves the request. That approval authorizes the attacker’s client, not a sign-in the person started.
The lesson is subtle: a legitimate website helps establish where you are. It does not establish who started the request. A familiar app name alone does not settle that question either.
Multifactor authentication remains an important protection, but it is not a reason to approve an unexpected request. In this scenario, a person can complete a legitimate sign-in challenge while authorizing a client the attacker started. The resulting access token lets the authorized client act within its granted permissions; the attacker does not necessarily need to learn the account password.
The phishing technique is already real
The Copilot outcomes are a laboratory demonstration, but device-code phishing has a documented history. In a separate 2025 report, Microsoft described a group it tracks as Storm-2372 using messages and fake meeting invitations to persuade targets to complete attacker-generated sign-ins. Microsoft observed the group using access to search and extract email. That campaign involved different services; Microsoft does not report that it produced the Copilot outcomes tested in the new research.
The pretext is part of the strategy. A meeting request or an IT message gives the code a plausible reason to exist. Our reporting on fake AI event invitations targeting Microsoft and Google accounts shows another way an apparently relevant invitation can lead someone toward an account-theft attempt. These are separate cases, not evidence of one coordinated campaign.
What Microsoft’s test actually showed
Microsoft’s researchers controlled both sides of the experiment and used a test account. Once that account approved the attacker-initiated request, they demonstrated four potential outcomes, each dependent on the account’s access and enabled settings:
- Private code: The test authorization could access private repositories available to the account, within the permissions requested and granted.
- Saved conversations: Where cloud session storage was enabled, researchers could read synchronized Copilot CLI sessions, which may contain code or other work context.
- Misleading memory: Researchers added false entries to the assistant’s saved memory. If used later, those entries could influence future interactions; the risk depends on the memory features and policies in use.
- An active session: Researchers could steer an online, interactive Copilot CLI session when remote control was enabled and organization policy allowed it. Commands remained subject to local permissions and approval settings.
These are possibilities demonstrated in the lab, not evidence that everyone using Copilot is exposed in the same way. Remote steering required an approved attacker-initiated sign-in, an active online session, remote control enabled and an organization policy that allowed it. GitHub’s remote-control documentation describes the feature behind that part of the experiment.
The bigger question: What can your assistant reach?
An AI assistant is useful because it can work with context: files, code, prior conversations and sometimes tools that perform actions. The same context can increase the consequences when an attacker gains an authorized route into the account or session.
Consider a hypothetical developer whose assistant can see a private repository and whose organization allows cloud-synced sessions. An unwanted authorization could expose more than the current chat. It might expose earlier working context or code the account is allowed to access. That does not mean every session contains secrets, or that every account has those features enabled. It means incident response has to ask what was reachable—not just whether a password was stolen.
There is a useful connection to our reporting on stolen AI keys and attacks. In a separate, observed campaign, Microsoft reported attackers using AI-assisted tools to search for exposed credentials; in one case, an agent moved from searching GitHub to extracting data from Azure Key Vault in five minutes. That was a different attack, not evidence that the Copilot lab scenario occurred. Together, they show why both exposed credentials and overly broad authorized access deserve attention.
Our coverage of phishing around the Microsoft 365 outage offers another lesson: attackers can wrap a malicious request in something familiar and timely. In that campaign, the outage was real. In Microsoft’s Copilot simulation, the sign-in page was real. In neither case should familiarity replace checking what you are being asked to do.
If you receive a code or approval request
- Pause before approving. Enter a device code only when you started that sign-in yourself and can match it to the tool and device you are using. A code sent unexpectedly by email, chat or someone claiming to be support deserves independent verification.
- Verify through a known channel. If a request appears to come from your employer, contact your IT team using a number or address you already trust. Do not rely on contact details in the message.
- If you only received the message: Do not approve the request; report it according to your organization’s process. Receiving a message alone does not prove an account was compromised.
- If you approved an unexpected request: Tell your security or IT team promptly and preserve the message and timing. Use GitHub’s authorized OAuth apps guidance to review and revoke unexpected access, coordinating with your organization where applicable. Revoking an app can interrupt legitimate integrations; ask your security team for help identifying it.
Responders should identify the affected account and authorization, assess accessible sessions and repositories, review relevant audit logs and saved assistant memory, and rotate credentials that may have been exposed. Confirm that the unwanted access has been revoked. Changing a password alone should not be assumed to remove every authorized application or token. If work is managed by an employer, coordinate before making changes that could disrupt an investigation.
What organizations can do now
Review who can access sensitive repositories and whether cloud session storage, remote control and memory are needed for each workflow. Syncing a session does not by itself enable remote control; the two settings have different implications. Microsoft says disabling memory does not automatically delete entries already saved, so check existing entries as part of an investigation. GitHub provides guidance for managing Copilot Memory.
Microsoft also describes detections for suspected device-code phishing via email and Teams. Their availability depends on supported configuration and required telemetry, including GitHub Enterprise Cloud integration. Security teams should validate the setup rather than assume every GitHub environment has the same coverage.
For a broader starting point, see our guide to protecting your business from hackers. If you are concerned an account may already be compromised, our first-response guide explains how to assess the situation and secure access.
The question to ask before approving the next code is simple: Did I start this sign-in? As AI assistants become more capable, that small pause can protect a much larger circle of access.