For two months, anyone could hijack the Grok AI — and inject malicious code — thanks to a single exposed key.
A developer at xAI, Elon Musk’s AI venture, accidentally committed a private API key to GitHub, granting full access to internal AI models trained on data from SpaceX, Tesla, and X (formerly Twitter). The leak went unnoticed until a Seralys employee found it and posted the discovery on LinkedIn.
The issue immediately caught the attention of GitGuardian, a cybersecurity firm that specializes in detecting secrets in code. They discovered that the key provided full access to at least 60 private and modified language models, including unreleased versions of Grok, xAI’s flagship chatbot. Among the models were ones clearly labeled with references like grok-spacex-2024-11-04 and tweet-rejector.
According to GitGuardian, they first alerted the key owner on March 2, but the API key remained active until April 30 — nearly two full months. It was only after a direct appeal to xAI’s security team that the key was revoked and the repository taken down. Until then, anyone with the key could query private models and use xAI’s internal API as if they were an employee.
A Backdoor to AI Infrastructure
GitGuardian emphasized the high-risk implications of the leak. With backend access to Grok, attackers could perform prompt injections, alter model behavior, or even inject malicious code into AI pipelines, potentially compromising downstream systems.
Disturbingly, the story emerged just as the DOGE department — an experimental AI unit working within the U.S. government — was revealed to be feeding Grok-like models data from the Department of Education for budget analysis, with plans to expand AI use across federal agencies. Over 1,500 federal employees were reportedly given access to an internal chatbot named GSAi, built by DOGE.
Was Sensitive Data at Risk?
xAI has claimed that no user data or government systems were accessible via the leaked key. However, experts remain skeptical. Even without direct database access, models trained on sensitive internal datasets could potentially regurgitate fragments of confidential information, including from proprietary or classified sources.
The incident raises serious questions about security hygiene in AI development, especially as language models become embedded in sensitive workflows across both the private sector and government.
Would you like a version of this formatted for forum or media posting?
