AI Agent Security: Lessons from the Hugging Face Hack

Let's look at what happened during the Hugging Face/OpenAI hacking incident and see what we can learn from it.

AI agent security

Key takeaways

  • AI attacks can outpace human responders. Containment breaches from test harnesses show why defenses also must be automated, in real time.

  • Relying on gated frontier models for incident response is risky. Keep a strong model on hardware you control.

  • Look for an AI agent platform and harness built around a security-first premise—one that doesn't lock you into a vendor-owned system.


By Mike Rollins—AI agent security has gone from an obscure field to hot news following the Hugging Face-OpenAI hacking saga.

The incident showed that humans can't keep up with hacking that occurs at the speed of AI. And it also showed how easy it is to stoke fears about something that people don't understand.

Most people aren't aware of, or are not considering, that the OpenAI model that became the world's fastest hacker was operating in a hacker harness. The idea that OpenAI is testing hacking harnesses is wild, but they were.

Let's look at what happened and see what we can learn from it.

What happened in the Hugging Face hack?

OpenAI was training an AI model inside a harness designed for hacking. This hacking simulation broke containment and attacked Hugging Face. (For the record, OpenAI is the proprietary, closed-source pioneer AI company that builds ChatGPT. Hugging Face—the "GitHub of AI"—is the open-source platform and community for AI and machine learning.)

The OpenAI model got into Hugging Face through its data pipeline. It compromised the node it was in and spread laterally through other nodes. Along the way, it was taking credentials, it was taking everything. As it spread through Hugging Face's systems, he dominoes started falling. Pop, pop, pop, pop, pop.

Hugging Face tried to defend itself by using ChatGPT and Claude, but those frontier models are gated and their guardrails kicked in. To stop the hack, Hugging Face stood up an open-weight Chinese model on its own internal hardware.

Using GLM 5.2, Hugging Face was able to fend off the attack and boot the rogue agent system out of their cluster.

What should I learn from the Hugging Face hack?

This is not the first such containment break we know about. There was another instance where a Chinese model broke containment. For whatever reason, it decided that it needed to go mine cryptocurrency. (What kind of simulation were they running that led to this thing deciding it needed to make money?)

Hugging Face said this latest incident was unique because it was completely driven by an autonomous AI agent system.  

There is plenty to think about in the fallout from the attack. Here are a preliminary thoughts:

  • The speed of AI. The Hugging Face team could not defend against it in real time without using another model. They said it would have taken them weeks to try to contain the attack as it was taking over everything. The only way they could respond in real time was with another AI model.

  • Limited defense options. Pioneer platforms like Claude and ChatGPT can't be used to fend off an attack of this nature because they cannot distinguish an attacker from a defender. They're gated, and if the frontier model is the thing that's attacking you, you have no recourse.

  • Arm yourself in advance. You may need to consider having a very high capability model on hardware that you control in the event of an attack because you won't be able to use the frontier models.

  • Self-defense tactics. Hugging Face now recommends rotating every key and replacing every password routinely.

Value vs. security with AI agents

Agentic AI systems can be:

  • Goal-driven (not step-driven)

  • Adaptive

  • Fast at iteration

  • Capable of chaining actions across tools and systems

They provide value in many ways, but the same properties that make agents effective assistants can make them effective attackers if compromised, misconfigured, or adversarially manipulated.

To avoid that conflict, Rex is built around a security-first premise. Rellify's Rex, our AI agent interface, can deliver quality, security, and depth of company context without forcing teams to hand over proprietary knowledge to public, vendor-owned systems.

Rellify provides digital sovereignty—deploying AI at scale while keeping the organization’s knowledge and intelligence layer under its own control. AI safety and control is a core pillar of Rex, with an emphasis on staying compliant, protected, and in control of IP.

Rex is built differently than typical chat-based AI because Rellify’s architecture is agent-first and company-owned:

  • Agents own the workspace.

  • Humans collaborate with them.

  • The knowledge persists even when employees leave.

This reduces the risk profile of fragmented “personal assistant” usage patterns (where context and decisions end up siloed across individual accounts) and it preserves governance continuity.

Rex has a key advantage versus platforms where agents live inside a vendor ecosystem and are constrained by that vendor’s control plane. Rex’s workspaces and agents are designed to remain owned by the company and portable across underlying models/environments.

Finally, Rex is positioned as an operational layer—not a chat box. It

  • Integrates documents and structured data.

  • Retrieves relevant internal context automatically.

  • Keeps durable configuration across sessions.

  • Standardizes usage through workflows/blueprints plus a governance layer.

That’s more secure than working directly with LLMs, where teams fall into manual context re-pasting and inconsistent, non-repeatable behavior—exactly the conditions that increase exposure and make outcomes hard to audit.

Rellify’s agent harness model—with persistent storage, long-term memory, secure sandboxes for execution, and controlled networking/connectors—is the foundation that makes AI both more capable and more governable in real business environments.

FAQ

What is AI agent security?

AI agent security is the set of controls that prevents and contains attacks when AI systems can access tools, APIs, data pipelines, and execution environments.

The key shift is that risk increases with agent level: a chat assistant is mostly informational, but tool-calling agents and code-executing agents can change systems at machine speed.

Strong AI agent security requires:

  • Sandboxed execution.

  • Least-privilege tool access.

  • Monitored networking/connectors.

  • Governed memory and storage.

  • An incident response plan designed for agent-speed lateral movement.

How is AI agent security different from LLM security?

LLM security often focuses on prompt injection, data leakage, and output safety. AI agent security extends that into system boundaries: IAM, networking, sandboxes, connectors, and audit trails—because agents can change real systems.

Why are data pipelines so risky?

Pipelines are highly connected, automated, and often privileged. They ingest untrusted inputs, touch sensitive datasets, and run across environments—making them ideal for initial footholds and lateral movement.

A secure AI port in the storm

If you want to maximize AI agent security with a system that makes governance and execution practical, start your free trial with Rex today, or book a demo.

Michael Rollins is a fractional CTO, engineering leader and day-to-day coder. He has deep experience in mobile and backend, and is currently thoroughly enjoying the rocket ship that is AI. You can reach him at michael@rollins.io, or on LinkedIn.