
An API key leak at Elon Musk’s artificial intelligence firm xAI exposed proprietary large language models (LLMs) tied to SpaceX, Tesla, and Twitter/X for over two months. The incident, discovered by GitGuardian, involved an employee inadvertently publishing a private API key on GitHub, granting unauthorized access to 60 unreleased models and internal datasets[1]. This breach highlights critical security gaps in secret management and raises concerns about regulatory compliance, particularly regarding ITAR-controlled SpaceX data[2].
Timeline and Technical Scope
The exposed API key remained active from March 2 to May 6, 2025, despite GitGuardian’s initial alert on March 2[3]. The key provided admin-level access to xAI’s model repository, including:
- SpaceX:
grok-spacex-2024-11-04
(potential ITAR violations) - Tesla: Models processing vehicle telemetry and customer service logs
- Twitter/X:
tweet-rejector
(content moderation) anddoge-surveillance
(government monitoring tools)
Security researcher Philippe Caturegli noted the two-month exposure window allowed potential nation-state actors to exfiltrate data or backdoor models[4]. CO/AI later confirmed the key also granted access to 3TB of Tesla vehicle data and model training datasets[5].
Security Failures and Response
The incident revealed multiple security lapses:
Failure | Impact |
---|---|
No multi-factor authentication (MFA) | Allowed unrestricted use of the leaked key |
Delayed revocation (60+ days) | Extended exposure window for data exfiltration |
Admin-level permissions | Enabled model fine-tuning by unauthorized parties |
xAI revoked the key and deleted the repository after GitGuardian escalated the issue on April 30, but made no public statement[1]. The FTC has since opened a probe into xAI’s data protection practices[6].
Mitigation Strategies
Organizations handling sensitive AI models should implement:
- Automated secret scanning for GitHub repositories (e.g., GitGuardian, TruffleHog)
- Role-based access control (RBAC) for API keys with time-bound permissions
- Mandatory MFA for all administrative API access
GitHub’s lack of proactive secret scanning was criticized in Hacker News discussions, with suggestions to implement pre-commit hooks for key detection[7].
Broader Implications
The leak has delayed xAI’s $113B merger with X Corp pending a security audit[8]. It also raises ethical concerns about LLM usage, particularly Twitter/X’s doge-surveillance
model reportedly used to monitor federal employees[9].
This incident serves as a case study in AI supply chain security, demonstrating how compromised API keys can expose interconnected systems across multiple enterprises. The lack of network segmentation between xAI, Tesla, and SpaceX models amplified the breach’s impact.
References
- “xAI Developer Leaks API Key for Private SpaceX, Tesla LLMs”, KrebsOnSecurity, May 2025.
- “xAI Developer Exposes API Key for SpaceX and Tesla’s Private LLMs”, CO/AI, May 2, 2025.
- GitGuardian State of Secrets Sprawl Report 2025.
- Philippe Caturegli’s LinkedIn post, May 2025.
- CyberCureMe Facebook post, May 2025.
- FTC Probe Announcement, May 2025.
- Hacker News discussion thread, May 2025.
- “xAI Merger Delay”, NewsBreak, May 2025.
- “Musk’s DOGE Using AI to Snoop on US Federal Workers”, Reuters, April 2025.