xAI developer leaks API key for private SpaceX and Tesla LLMs
An xAI employee accidentally exposed a private API key on a public GitHub repository. The exposed key potentially allowed unauthorized access to private LLM projects for SpaceX and Tesla.
An API key linked to private SpaceX and Tesla LLM projects sat exposed in a public repo for weeks.
Key facts
- What
- An xAI employee accidentally exposed a private API key on a public GitHub repository.
- Incident date
- Mar 1, 2025
- Who
- xAI
- Failure mode
- Data Leakage
- AI surface
- Agentic Workflow
- Severity
- High
What happened
An xAI employee leaked a private API key by uploading an environment file to a public GitHub repository. Despite an automated alert from GitGuardian on March 2, 2025, the credential remained exposed for several weeks. This exposure potentially allowed unauthorized actors to query private LLMs used by SpaceX and Tesla.
What broke inside the model
- 01 · TriggerA request triggers retrieval or context loading.
- 02 · Model stepThe context pulls in another user's content.
- 03 · Control gapNo boundary enforces isolation at the moment of output.
- 04 · FailurePrivate data crosses into the response.
- 05 · ConsequenceOne user sees another's data, and disclosure follows.
One user's content crosses the retrieval boundary into another's response.
The failure was a security management lapse where a private API key was committed to a public repository. This bypassed secret-management protocols, allowing the credential to be indexed and discovered by third parties.
What it cost
Sources
- PressxAI dev leaks API key for private SpaceX, Tesla LLMskrebsonsecurity.com
- PressxAI leaked API key - Cloud Threat Landscapethreats.wiz.io
Cite this entry
https://failureindex.ai/failures/xai-developer-leaks-api-key-privateAI Failure Index. "xAI developer leaks API key for private SpaceX and Tesla LLMs" (FI-0311). Realm Labs. https://failureindex.ai/failures/xai-developer-leaks-api-key-private (indexed Jun 5, 2026).Data fields CC-BY 4.0, prose citation permitted. Incident ID FI-0311. Full dataset at /data.
Note from Realm Labs, the Index steward
How Realm would have caught this
- Prism
- OmniGuard
- AI Detection & Response (AIDR)
Realm can detect when a response is about to emit data that falls outside the bounds of the current user and context, and block or redact it inline, at the moment of generation rather than after the data has left.