xAI API key on public GitHub

xAI staffer's API key to private models leaked on GitHub

Disclosed May 1, 2025Technology

The record

An xAI API key belonging to a member of its technical staff sat in a public GitHub repository for about two months in 2025, KrebsOnSecurity and GitGuardian reported. KrebsOnSecurity said it gave access to at least 60 private and unreleased models, including some apparently built for SpaceX and Tesla data. GitGuardian said it flagged the key in March and that it was revoked after a second report in late April.

  • Employee
  • Negligent or accidental
  • Credentials or data exposed by mistake
  • No public charges
Organisation
xAI
Insider
xAI technical staff member
Method
KrebsOnSecurity reported that an xAI API key sat in an .env file in a public GitHub repository for about two months, giving access to public Grok models and to private or unreleased models apparently built for SpaceX, Tesla and X data.
When
March 2, 2025 to April 30, 2025
How it was found
GitGuardian said its automated scanning flagged the key on March 2, 2025 and emailed the commit author; the alert went unaddressed until a researcher raised it publicly about two months later.
Outcome
No charges. KrebsOnSecurity reported the repository was removed; GitGuardian said the key was also revoked a few hours after its April 30, 2025 report to xAI. No xAI statement is cited.
Damage
KrebsOnSecurity reported access to at least 60 fine-tuned and private LLMs. No misuse was reported.

What each party says

  • GitGuardian: GitGuardian said an xAI staff member's API key sat in a public repository from March 2, 2025 and reached private and unreleased models, which KrebsOnSecurity also reported.

    Confirmed, per GitGuardian

  • KrebsOnSecurity: KrebsOnSecurity reported the key had been exposed "for the past two months", was still valid on April 30 and gave access to at least 60 fine-tuned and private LLMs.

    Unverified, as reported by KrebsOnSecurity

  • GitGuardian: GitGuardian said, "only a few hours later, the leaky repository was removed from GitHub and the key revoked"; xAI made no statement in the cited sources.

    Unverified, per GitGuardian

Sources

Every fact above was checked against these on November 28, 2026.

  1. xAI Dev Leaks API Key for Private SpaceX, Tesla LLMs (opens in a new tab)KrebsOnSecurity, news report, May 1, 2025
  2. xAI Secret Leak: The Story of a Disclosure (opens in a new tab)GitGuardian, company statement, May 7, 2025

How Above reads a case

Above's AI investigators work each insider and AI-agent signal to a verdict, with its evidence and reasoning.