Marko Elez, a 25-year-old employee at Elon Musk’s Department of Government Efficiency (DOGE), has been granted access to sensitive databases at the U.S. Social Security Administration, the Treasury and Justice departments, and the Department of Homeland Security. So it should fill all Americans with a deep sense of confidence to learn that Mr. Elez over the weekend inadvertently published a private key that allowed anyone to interact directly with more than four dozen large language models (LLMs) developed by Musk’s artificial intelligence company xAI.

Image: Shutterstock, @sdx15.
On July 13, Mr. Elez committed a code script to GitHub called “agent.py” that included a private application programming interface (API) key for xAI. The inclusion of the private key was first flagged by GitGuardian, a company that specializes in detecting and remediating exposed secrets in public and proprietary environments. GitGuardian’s systems constantly scan GitHub and other code repositories for exposed API keys, and fire off automated alerts to affected users.
Philippe Caturegli, “chief hacking officer” at the security consultancy Seralys, said the exposed API key allowed access to at least 52 different LLMs used by xAI. The most recent LLM in the list was called “grok-4-0709” and was created on July 9, 2025.
Grok, the generative AI chatbot developed by xAI and integrated into Twitter/X, relies on these and other LLMs (a query to Grok before publication shows Grok currently uses Grok-3, which was launched in Feburary 2025). Earlier today, xAI announced that the Department of Defense will begin using Grok as part of a contract worth up to $200 million. The contract award came less than a week after Grok began spewing antisemitic rants and invoking Adolf Hitler.
Mr. Elez did not respond to a request for comment. The code repository containing the private xAI key was removed shortly after Caturegli notified Elez via email. However, Caturegli said the exposed API key still works and has not yet been revoked.
“If a developer can’t keep an API key private, it raises questions about how they’re handling far more sensitive government information behind closed doors,” Caturegli told KrebsOnSecurity.
Prior to joining DOGE, Marko Elez worked for a number of Musk’s companies. His DOGE career began at the Department of the Treasury, and a legal battle over DOGE’s access to Treasury databases showed Elez was sending unencrypted personal information in violation of the agency’s policies.
While still at Treasury, Elez resigned after The Wall Street Journal linked him to social media posts that advocated racism and eugenics. When Vice President J.D. Vance lobbied for Elez to be rehired, President Trump agreed and Musk reinstated him.
Since his re-hiring as a DOGE employee, Elez has been granted access to databases at one federal agency after another. TechCrunch reported in February 2025 that he was working at the Social Security Administration. In March, Business Insider found Elez was part of a DOGE detachment assigned to the Department of Labor.

Marko Elez, in a photo from a social media profile.
In April, The New York Times reported that Elez held positions at the U.S. Customs and Border Protection and the Immigration and Customs Enforcement (ICE) bureaus, as well as the Department of Homeland Security. The Washington Post later reported that Elez, while serving as a DOGE advisor at the Department of Justice, had gained access to the Executive Office for Immigration Review’s Courts and Appeals System (EACS).
Elez is not the first DOGE worker to publish internal API keys for xAI: In May, KrebsOnSecurity detailed how another DOGE employee leaked a private xAI key on GitHub for two months, exposing LLMs that were custom made for working with internal data from Musk’s companies, including SpaceX, Tesla and Twitter/X.
Caturegli said it’s difficult to trust someone with access to confidential government systems when they can’t even manage the basics of operational security.
“One leak is a mistake,” he said. “But when the same type of sensitive key gets exposed again and again, it’s not just bad luck, it’s a sign of deeper negligence and a broken security culture.”
Musk and Trump hire only the best. I doubt there will be any repercussions for his sloppy and dangerous disregard for security.
Not when those who should hand out the repercussions are clueless, above the law, can do no wrong, and couldn’t care less about who they hurt, even when it’s themselves.
“Russians don’t take a dump without a plan, son.”
-Former US Presidential candidate Fred Thompson, ‘acting’
“One ping, one ping only” Proceeds to send two pings.
Everyone knows you can’t trust a Marko Buckaroo.
Looks like now we have Alfred E. Neuman running the show…
Now that’s just MAD… I nearly wet myself when I saw this comment! 😀
Alfred E. Neuman for president! We could do worse.
Separated at birth… AmIrite? 🙂
Geez…appalling. Will we hear about any exfiltration of data from govt databases, or is everyone on the wrecking team now?
Just one question; how do you “revoke” an API key? Replace maybe? (Revocation is possible for X.509 public keys)
Hopefully the application has a way to deny the key. I’m not a developer but you could have a deny list and refuse any connections from keys in the deny list. Also terminate any active sessions using that key.
@Dave M Yes, that’s how you do it. There is a list of active keys, you remove the compromised key from the list. If it’s not done quickly, then it’s probably because it is “hard to change” (hardcoded in several places) or the key owner does not care. Worse, they might think that it is safe again now that it was “removed”.
Remembering how, in the olden days of ‘such terrible security’, i.e. the 1990s through some time in the late 2000’s, many firewall rules actually required an IP to match a key to be able to connect to an application. I guess they don’t do that anymore, since everything is so webbed up now. LMAiO.
There’s already been evidence of data being exfiltrated to Russia. Started very early on, I believe it was from Treasury. It was detected and shut down.
Perhaps some enterprising hacker with a progressive streak will obtain and leak the personal financials of the current regime, starting with the Tangerine Caligula (and its entire family), Hillbilly Vance and the whole cabinet — straight through to the five Republican appointees of the Supreme “Court” (five by presidents who lost the popular vote).
Does it make you feel better about yourself to call other people names?
Cry harder, magat.
“Does it make you feel better about yourself to call other people names?”
Oh, do you mean like the convicted felon – and adjudicated rapist – does virtually every single day (using vulgar, disgusting and obscene language in barely coherent sentences with syntax that would embarrass a grammar school child)?
Does it make you feel better about yourself when you call other people names?
Repeat it a third time for effect.
It’s pretty bad when your pet beagle is smarter than the smartest people in government.
Young, dumb, and full of scum.
DOGGY DUMB.
bleepingcomputer.com/news/security/russian-pro-basketball-player-arrested-for-alleged-role-in-ransomware-attacks/
Marko can’t even dunk.
“So it should fill all Americans with a deep sense of confidence to learn that Mr. Elez over the weekend inadvertently published a private key”
I used to read your articles due to the non-biased nature. Now I feel like I’m reading an article from Foxnews or CNN.
Sad….
Ah yes, the sacred neutrality test: if something mildly inconveniences my worldview, it must be propaganda. Look, if your political compass is so wobbly that a cybersecurity report makes you cry “partisan hit piece,” maybe it’s not the article…
Brian literally reported a dude leaking a private key, and you interpreted it as a political betrayal. That’s not bias, that’s you projecting your own tribal lens onto reality like it’s a Rorschach test. But sure, let’s cancel Krebs for… reporting the news. Classic.
Wondering what your reaction would be to a report of repeated colossal comsec blunders by a regular civil service employee?
Where’s the bias in that statement?
I agree w/you 100% some simply can’t help themselves
I’m concerned about your reading skills too.
Say what you want, but Krebs has been relentlessly consistent for years… Calling out cyber threats whichever side they come from.
What is the bias in that statement? A bias against blatant incompetence among those with access to enormous troves of sensitive information? Yeah, I guess a lot of us are biased. We should really examine our prejudices more carefully…
I think we are looking at a process issue. Its true the security aspect is involved but the root of the problem is the process they use to post code on GitHub, they need to refine the process to avoid this kind of mistake.
It takes longer to select a vendor and give them a credit card number than to actually enable repository governance. Secret scanning pre-commit and second approver enforcement are the bare minimum anyone should have for production.
Brian, you used to be non-partisan and non-political, but now we’re seeing your true colors emerge. It’s fine to publish the screw ups of these so-called experts, but when you throw in the stupid political jabs, it ruins the article. Too bad; your articles used to be worth reading.
Not sure how you came away with the conclusion that this is somehow a story about right/left politics. Nevertheless, I release you from your subscription. Be well.
I don’t see the “political jabs” in your report, as was mentioned by a previous comment.
I do see a report on sloppy incompetence, or worse, criminal behavior with critical consequences for all of us.
It is important to report on it regardless of who may be offended or who the sloppy criminals are connected to. Keep up the investigation and reporting, Brian.
Ham is just being a crybaby. If his complaints are that thin his skin must be like rice paper.
They want you to be a “news reporter” that publishes “just the facts”, once you give your opinion as an expert it suddenly crosses the line, as though they couldn’t draw the conclusion themselves, which is apparently the case. Keep up the good work.
Oh no! Brian used sarcasm. Sound the alarm! Apparently pointing out that government officials leaking an API key might not instill public confidence is now a full-blown political manifesto. Incredible.
But thank you for your bravery in calling out this injustice. Truly, the real victim here is your feelings. Not the compromised API key, not the laughable opsec no, it’s you, because Brian dared to say something that vaguely pricked your partisan bubble. Stay strong, soldier.
Really ham!! Its amazing to see your lack of reading and understanding. You are the problem with this country. When people like you try to politicize everything. Facts are facts get use to it dude
Oh, no, did your feelings get hurt, snowflake?
The true colors of being appalled by the lack of professionalism of the current administration?
That’s the color of anyone with a functioning brain.
“Waaaah, he pointed out incompetence and fraud in the Trump administration, waaaaah.”
Grow up baby.
What is the political jab in the piece?
Just curious Ham, when did careless idiots become a political party, and better yet one free from criticism of their misdeeds?
“…when did careless idiots become a political party…”
It’s hard to point to a specific date, but sometime around when Trump started winning primaries in the 2016 race.
…now THAT was a stupid political jab. See the difference, Ham?
Brian, thank you for the reporting. It’s sad that reporting inconvenient facts about API key leaks and lapses in security at the highest levels is seen as political.
Keep up the good work.
I would like to think this person would be removed the moment this was found out. This is not only extremely dangerous but seems like a malicous actor. Anyone in the Tech field this looks and feels like malicous inside actor. This person needs to be removed and investigated.
This person seems like they are a malicous actor. Something we in the tech field worry about. He should be removed and investigated. You dont accidentally do this sort of thing. This is a deliberate act and it would be grounds for investigations.
If he wanted to grant access to 3PLA, he could just grant their users access to the model or email them the API keys. This behavior is totally consistent with the incompetent chūni clowns in Elon’s entourage.
“grounds for investigations”
Oh, Pam Bondi and Kash Patel will put down their Nintendo Switch and get right on that, I’m sure.
In one of Brian’s earlier reports his source noted within minutes of DOGE folks being given administrator access there was at least one login from an IP geolocated to Moscow (if memory serves me correctly). It passes the “reasonable person on the street test” that government systems have been breached, data exfiltrated, and stealthware installed, courtesy the carelessness of DOGE staffers. They do not seem to be the sharpest knives in the draw and, ironically, I wonder how many of them will omit “Worked for DOGE” from their LinkedIn bios?
So the kid is some combination of careless/incompetent but the one quality demanded by this administration, he likely has in spades: loyalty/obedience! He has a fine career ahead of him – or at least the next 3.5 years.
Don’t forget hateful racial supremacist / nazi propaganda.
newsweek.com/fact-check-donald-trump-adolf-hitler-viral-quote-comparison-accurate-1843501
Yes, I would imagine they are a very highly trusted contractor for DHS/ICE, searching all government databases for targeting ethno-cities or whatever. Im ursprünglichen Chelsea Football Trikot ist alles legal.
Wasn’t this guy fired for saying pretty racist stuff online?
Wasn’t this guy fired for saying pretty racist stuff online?