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.

xAI · Incident Mar 1, 2025 · Indexed Jun 5, 2026 · 2 sources

An API key linked to private SpaceX and Tesla LLM projects sat exposed in a public repo for weeks.
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

Failure path · mode profile · Data Leakage
  1. 01 · TriggerA request triggers retrieval or context loading.
  2. 02 · Model stepThe context pulls in another user's content.
  3. 03 · Control gapNo boundary enforces isolation at the moment of output.
  4. 04 · FailurePrivate data crosses into the response.
  5. 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.

Public visibilityHigh
Regulatory exposureNone
Customer impactFew customers
Financial impactUnknown
Time to disclosureDays
  1. PressxAI dev leaks API key for private SpaceX, Tesla LLMskrebsonsecurity.com
  2. PressxAI leaked API key - Cloud Threat Landscapethreats.wiz.io
Permalinkhttps://failureindex.ai/failures/xai-developer-leaks-api-key-private
CitationAI 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).
Share cardA branded image of this record for posts and slides.

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

Controls for this failure mode
  • 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.