Friday, October 23, 2026

Developers Beware – Sophisticated Phishing Scams Exploit GitHub Device Code Flow to Hijack Tokens

A sophisticated and increasing wave of cyberattacks now targets software developers through a little-known yet legitimate GitHub feature: the OAuth 2.0 Device Code Flow.

Security experts, notably from Praetorian, have warned that threat actors are leveraging this mechanism to trick developers into surrendering access to their most sensitive code repositories and CI/CD pipelines.

The attacks pose a substantial risk to intellectual property and could facilitate large-scale supply chain attacks.

The Attack Methodology: From Device Codes to Rogue Tokens

At the heart of the attack is GitHub’s device code authentication, designed to help users log in on devices with limited input, such as smart TVs or IoT devices.

The process is straightforward: a device requests a short-lived code and a verification URL from GitHub’s OAuth service. T

The user enters the code in a browser to authenticate the device, which then fetches an access token on their behalf.

This flow is legitimate and necessary, but crucially, it doesn’t guarantee that the person generating the code is the same person authenticating it.

Attackers have found ways to exploit this vulnerability. Here’s how the attack typically unfolds:

A diagram of how an attacker could abuse the GitHub Device Code Authentication flow.
  • Step 1: Code Generation
    The attacker uses GitHub’s OAuth API to request a device code, scoped with powerful permissions such as user, repository, and workflow access.
  • Step 2: Social Engineering
    They deliver the device code and verification URL to the target (often via phone, email, or SMS), masquerading as IT or support staff.
  • Step 3: User Authentication
    The victim, believing the request is legitimate, visits the verification URL and enters the code, essentially authorizing the attacker’s device to act on their behalf.
  • Step 4: Token Retrieval
    The attacker retrieves the OAuth token, granting them long-term, elevated access to the victim’s GitHub resources.
  • Step 5: Exploitation
    With the token, the attacker can exfiltrate private code, manipulate CI/CD workflows, access secrets, and even initiate supply chain attacks by backdooring repositories.

Recent case studies highlight highly effective campaigns.

In one example, attackers used compromised internal access to proxy device code requests to an organization’s GitHub Enterprise, then leveraged phone-based impersonation to trick developers into authorizing access.

Another variant, “GitPhish,” automates the entire process, generating fresh device codes on demand via a professional-looking GitHub Pages site, ensuring every victim receives a valid, live code.

Defensive Strategies: Detection and Prevention Remain Critical

Currently, there is no way to outright disable device code flow on GitHub. As a result, technical controls and vigilant monitoring are critical:

  • Audit Log Awareness:
    Monitor GitHub’s audit logs for unauthorized OAuth authorizations (org_credential_authorization.grant events). Pay special attention to suspicious token scopes and multiple rapid events.
  • Network Monitoring:
    Watch for unusual spikes in visits to github.com/login/device, which may indicate a phishing campaign.
  • IP Allow-Listing:
    Restrict access to the GitHub organization to known, trusted IP addresses, though this may break CI/CD workflows if not carefully managed.
  • Post-Grant Behavior:
    Look for abnormal activity, such as excessive repository cloning or secret scanning, mainly if it occurs after a new OAuth authorization.

According to the Report, Security experts urge organizations to prepare robust detection and response playbooks.

With threat actors rapidly adopting GitHub device code phishing, the risk to developer environments and supply chains is clear.

Developers and security teams must remain vigilant, as the modern threat landscape offers no certainty except that the call is coming from within your own GitHub organization.

Find this News Interesting! Follow us on Google News, LinkedIn, & X to Get Instant Updates

Kaaviya
Kaaviya
Kaaviya is a Security Editor and fellow reporter with Cyber Security News. She is covering various cyber security incidents happening in the Cyber Space.

Hot this week

How To Access Dark Web Anonymously and know its Secretive and Mysterious Activities

What is Deep Web The deep web, invisible web, or...

How to Build and Run a Security Operations Center (SOC Guide) – 2023

Today’s Cyber security operations center (CSOC) should have everything...

Russian Hackers Bypass EDR to Deliver a Weaponized TeamViewer Component

TeamViewer's popularity and remote access capabilities make it an...

Web Server Penetration Testing Checklist – 2026

Web server pentesting is performed under three significant categories: identity,...

ATM Penetration Testing – Advanced Testing Methods to Find The Vulnerabilities

ATM Penetration testing, Hackers have found different approaches to...

StealC Infostealer Returns as Powerful Remote Access Trojan After Europol Takedown

StealC’s seller has resurfaced with Stadia, a modular remote...

Critical Okta Access Gateway Vulnerability Enables Remote Command Execution

A critical command execution vulnerability has been identified in...

Critical HPE Aruba AOS-8 Flaw Allows Hackers to Bypass SSH Authentication and Take Over Systems

Hewlett Packard Enterprise (HPE) has addressed a critical authentication-bypass...

Capcom Confirms Data Breach Exposing 11.7 Million CAPCOM ID Records

Capcom has confirmed a data breach that affects 11,774,247...

Quest Diagnostics Confirms Cyberattack Exposing Patient Records in Quanum System

Quest Diagnostics disclosed unauthorized access to its Quanum LSM...

Unauthorized AI Agents Found Accessing Customer Accounts at Major U.S. Banks

U.S. banks face challenges as third-party artificial intelligence agents...

SBI Notifies Customers Affected by Recent Cybersecurity Incident

The State Bank of India (SBI) has individually notified...

Related Articles

Recent News