台灣 AI x AEC 情報BY FBI SICENTER
AI × AEC · CURATED INSIGHT

Microsoft Discloses GitHub Copilot CLI Device Code Phishing Risks Allowing AI Agent Hijacking

Cybersecurity and privacy · AI coding · AI assistants

Microsoft research reveals that attackers can exploit GitHub Copilot CLI device code authentication via phishing. Tricking developers into approving codes on the official portal grants attackers OAuth tokens, exposing private repositories and cloud-synced sessions, with potential to manipulate AI agent memory or execute commands under specific conditions.

Microsoft Discloses GitHub Copilot CLI Device Code Phishing Risks Allowing AI Agent Hijacking
AI-generated concept illustration; not an event photograph.

In research published on November 17, Microsoft revealed that attackers can exploit the legitimate device code authentication flow to trick developers into approving login requests without stealing credentials, thereby obtaining GitHub OAuth access tokens. This grants access to victim resources, including private code repositories, within the authorized scope. According to Microsoft, if Copilot CLI session history is synced to the cloud, attackers could access development logs containing code snippets, file paths, and architecture discussions. Attackers could also inject misleading data into the AI agent's memory. Under specific conditions—where remote control is enabled, organization policy permits, and an active session exists—attackers might manipulate the AI agent to execute commands on the victim's machine, subject to local permissions and approval controls. To counter this, Microsoft researchers developed Microsoft Defender XDR detection mechanisms correlating phishing messages across email and Microsoft Teams with OAuth token generation events. Microsoft advises organizations to instruct users to approve only self-initiated device codes, review OAuth authorizations regularly, and restrict AI agent remote control and memory capabilities as needed.

Key takeaways

  • Microsoft disclosed that attackers can initiate GitHub Copilot CLI device logins and trick developers into approving codes on the official portal to seize OAuth tokens.
  • With stolen tokens, attackers can access private repositories and potentially read cloud-synced session history, including code snippets and architecture notes.
  • Under specific conditions with remote control enabled and active sessions, attackers may alter AI memory or execute commands, bounded by local authorization.
  • Microsoft developed Defender XDR detection mechanisms and recommended auditing OAuth permissions while restricting remote control and memory settings.

Source:iThome Read the original ↗

Prepared, checked and automatically published by AI; not individually reviewed by a human. Translation checked by AI.

← All articles