BotBeat
...
← Back

> ▌

Google / AlphabetGoogle / Alphabet
RESEARCHGoogle / Alphabet2026-04-15

Security Audit Reveals 2M+ GitHub Repositories Vulnerable to Google OAuth Email-Based Identity Fracture

Key Takeaways

  • ▸Over 2 million scanned repositories contain OAuth implementations vulnerable to Gmail rename attacks, with popular frameworks like Passport.js accounting for ~60% of affected projects
  • ▸Critical implementations store only email as identity key with no fallback, causing immediate data loss and user account fracture when Google accounts are renamed
  • ▸The vulnerability stems from developer education and documentation patterns that normalized using email as identity key rather than the stable OAuth `sub` identifier
Source:
Hacker Newshttps://neelagiri65.github.io/gmail-oauth-research/↗

Summary

A comprehensive security analysis scanning over 2 million GitHub repositories has identified a widespread vulnerability in OAuth implementations across popular frameworks and platforms. The vulnerability stems from developers using Google's email field as the primary identity key instead of the stable sub (subject) identifier, creating a critical security gap: when users rename their Gmail addresses, systems lose track of their identity, causing data loss and access revocation across dashboards, chat histories, CI/CD permissions, and cloud infrastructure. The issue affects major projects including GitLab's self-hosted version, open-source ChatGPT alternatives, analytics platforms, device management tools, and educational software. The research categorizes vulnerability severity into four levels—Critical (email as only key), High (email as fallback), Medium (stale display data), and Safe (sub as primary)—and found that popular scaffolding templates have silently propagated this anti-pattern into hundreds of production applications. Cal.com emerged as a correct implementation model, using token.sub as the primary identity key with email reserved for non-critical functions like rate limiting.

  • Cal.com demonstrates the secure pattern: using token.sub as primary identity key while relegating email to secondary, non-critical functions
  • High-stakes applications including GitLab, device management tools, payment platforms, and cloud infrastructure face audit trail breaks and access revocation when users rename Gmail accounts

Editorial Opinion

This discovery exposes a systemic failure in OAuth developer education across major frameworks and platforms. The irony is that Google's own documentation warns against this exact anti-pattern, yet it remains the de facto standard taught in tutorials and Stack Overflow answers. The scale—affecting 2M+ repositories—suggests this isn't merely a best-practices gap but a fundamental misunderstanding of OAuth identity semantics that has been baked into production systems for years. Until frameworks make sub-based identity the default and email a cosmetic field, users will continue experiencing data loss from seemingly minor account changes.

CybersecurityEthics & BiasAI Safety & AlignmentPrivacy & Data

More from Google / Alphabet

Google / AlphabetGoogle / Alphabet
UPDATE

Google Prepares Rollout of Skills Feature Across Gemini and AI Studio

2026-04-16
Google / AlphabetGoogle / Alphabet
PARTNERSHIP

Google and Pentagon in Advanced Discussions Over Classified AI Deal

2026-04-16
Google / AlphabetGoogle / Alphabet
UPDATE

Google Gemini Now Generates Personalized AI Images Using Your Google Photos Library

2026-04-16

Comments

Suggested

AnthropicAnthropic
RESEARCH

AI Safety Convergence: Three Major Players Deploy Agent Governance Systems Within Weeks

2026-04-17
OpenAIOpenAI
RESEARCH

When Should AI Step Aside?: Teaching Agents When Humans Want to Intervene

2026-04-17
AnthropicAnthropic
PRODUCT LAUNCH

Finance Leaders Sound Alarm as Anthropic's Claude Mythos Expands to UK Banks

2026-04-17
← Back to news
© 2026 BotBeat
AboutPrivacy PolicyTerms of ServiceContact Us