Grok’s Coding Tool Was Uploading Users’ Codebases
TL;DR: A security researcher found that xAI’s Grok Build CLI — a coding tool you run on your own computer — was quietly uploading users’ entire codebases, full history and secrets included, to a cloud storage bucket controlled by xAI. It happened even with the “improve the model” opt-out switched off. The uploads appear to have quietly stopped, but xAI hasn’t publicly explained what happened. If you don’t use that specific tool you weren’t caught up in it — but there’s a lesson here for everyone who uses AI to build.
What happened
On 13 July 2026, a security researcher using the handle cereblab published a wire-level analysis of xAI’s Grok Build CLI (version 0.2.93) — captured by intercepting the tool’s own network traffic. Several outlets, including International Cyber Digest and Cryptobriefing, reported the findings.
Here’s what the packet captures showed, as reported:
- When you ran the tool in a project, it uploaded the entire tracked repository — full Git history included — to a Google Cloud Storage bucket named `grok-code-session-traces`.
- In one documented test, it sent roughly 5.1 GB of data when about 192 KB was all the model actually needed to do its job.
- The “Improve the model” opt-out toggle did not stop it. With the setting off, the server still reported uploads as enabled.
- Because it uploaded whatever project it was pointed at, private codebases went up too — along with any secrets or credentials sitting in those files.
What changed after: about a day after the researcher went public, they re-tested and found the server now returning a hidden flag that switched the uploads off. So the behaviour appears to have stopped — but through a quiet server-side change, not an announcement.
What xAI has said: as of 13 July 2026, nothing public — no security advisory, no statement, no answer on how many people were affected, how long the data is kept, or whether what was already collected has been deleted. We’ll update this piece if that changes.
A few things are claimed but not confirmed, and we’re flagging them as such: there’s no proof xAI trained on the uploaded code, that any employee accessed it, or that credentials were misused. The “fix” was also only verified on one machine and one account, so treat “it’s fully resolved” with caution.
Why it matters if you don’t code
First, the reassuring part: this is a specific developer tool — xAI’s Grok Build CLI, which you install and run from a command line. It is not the same as using the Grok model inside another app. If you tried Grok 4.5 inside Cursor, or you vibe code with Lovable, Bolt or Replit, you were not part of this. Different product entirely.
Now the part that matters for everyone: this is a clean example of the risk that sits under every AI building tool. These tools send your work somewhere to do their job — that’s how they work. The questions that matter are how much do they send, where does it go, and can you actually turn it off. Here, the answers were “far more than needed”, “a company’s private cloud”, and “no, the off switch didn’t work”. You don’t need to code to see why that’s a problem.
The honest takeaway isn’t panic. It’s that an opt-out is a promise, not a guarantee, and the only data that can’t leak is data you didn’t hand over in the first place.
If you used Grok Build CLI, do this
- Update the tool to the latest version — the uploading behaviour was reportedly switched off after 0.2.93, but run the newest build to be safe.
- Rotate any secrets that lived in projects you opened with it — API keys, passwords, tokens in `.env` files. Treat them as exposed and replace them.
- Check your settings and turn off any “improve the model” / data-sharing option (even though it failed here, leave it off).
- Assume the older uploads still exist until xAI says otherwise, and factor that into anything sensitive.
Good habits for everyone (even if you’re not affected)
- Don’t keep passwords, API keys or secrets inside a project you feed to an AI tool. Use the tool’s secrets manager or environment settings instead.
- Skim the privacy / data settings of any AI builder you use, and switch off model-training sharing if you’d rather not contribute your work.
- Prefer tools that are clear about what they collect. Transparency is a feature.
Our take
The upload itself is the kind of thing that could be a genuine mistake — over-eager telemetry is a common bug. What’s harder to shrug off is the silence: a quiet server-side switch and no word on scope, retention, or deletion. Trust in these tools is built on exactly those answers, and right now they’re missing. We wouldn’t tell anyone to panic — but we would treat every AI tool’s “we don’t keep your data” as something to verify, not assume, and we’d keep our secrets out of reach by default.
Want a tool that fits how you work — without guessing? Take the 60-second Vibe Coding Tool Finder quiz →
FAQ
I used Grok 4.5 inside Cursor — was my code uploaded?
No. This incident involves xAI’s separate Grok Build CLI, a standalone command-line tool. Using the Grok model inside another app like Cursor is a different product and wasn’t part of these reports.
What should I do if I did use Grok Build CLI?
Update to the latest version, then rotate any passwords, API keys or tokens that were in the projects you opened with it — treat them as exposed. Turn off any data-sharing setting, and assume earlier uploads may still exist until xAI says otherwise.
Has xAI responded?
Not publicly, as of 13 July 2026. There’s been no advisory or statement about how many users were affected, how long the uploaded data is kept, or whether it has been deleted. We’ll update this article if that changes.
