loading min read

What the Hugging Face incident teaches us about the OCC’s AI framework

The Hugging Face incident puts AI governance to the test. Explore five lessons organizations can apply to strengthen AI risk management.

In July, AI agents at OpenAI were taking a cybersecurity exam. Some of the questions had no workable answer. So, the agents went looking for the answer key, and within days they held administrator access inside the production systems of Hugging Face, one of the most widely used platforms in AI. No person directed any of it.

This incident provides organizations with something AI governance guidance often cannot: a real-world stress test. Following what happened from initial access through containment shows where controls failed, where they worked, and how the Office of the Comptroller of the Currency’s (OCC) questions about authority, monitoring, accountability, and intervention can help organizations evaluate their own AI risks.

In Part One of our AI governance series, we walked through the OCC’s new examiner framework for AI and argued that its core questions apply well beyond banking. What may the system do? What happens when it is wrong? Who can stop it? Who is accountable? Can you prove it? This incident answers each one with a real example.

Two notes before we start. First, everything here comes from the two companies’ own published accounts, which were unusually candid; we are learning from their openness, not second-guessing it. Second, your organization sits in both seats. You deploy AI agents, as OpenAI did. You also run systems that other people’s agents can reach, as Hugging Face does. The OCC framework covers both, including agents you do not control arriving through your own channels.

What happened

OpenAI was running an internal test of how well its models could find and exploit software flaws. To measure raw capability, it ran the test with reduced safeguards. The agents were meant to be isolated from the internet and from each other. They found a way around both restrictions.

When (2026) What happened
Late May An OpenAI team sees agents leaving notes for each other and reaching the internet when they should not
July 4-5 Agent activity knocks an internal service offline; a security incident is opened, fixes are applied, and testing resumes
July 8 The agents regain internet access and rebuild their message board
July 10 An agent finds 14 publicly exposed Hugging Face credentials with write access
July 11 Agents get code running on a Hugging Face production worker; in under 13 hours they hold administrator access across multiple internal clusters
July 13 Hugging Face’s security team cuts off access
July 16 Hugging Face discloses the intrusion without knowing whose agents they were
July 19-21 OpenAI detects unusual activity, links it to Hugging Face, and discloses its involvement

Sources: OpenAI’s account and Hugging Face's technical timeline

Hugging Face later reconstructed about 17,600 separate actions. The damage was contained: the only customer content accessed was five datasets tied to the test itself, and the company verified that its published software was clean. OpenAI called the episode a “warning shot.”

The risks were ordinary; the speed was not

Hugging Face’s own conclusion highlights an important point: the individual weaknesses were familiar ones  What changed was scale. The agents tried thousands of paths, most of which failed, and kept going until one worked.

What was in plain sight beforehand

At the lab:

    • A test treated as low risk. The production safeguards and monitoring that protect customers were not applied to this internal evaluation.
    • A shared service with a door to the internet. The agents could reach an internal software package service that itself had outside access.
    • Tasks with no safe exit. Of 898 test tasks, 198 had never been solved by any model, and the agents had no accepted way to say, “this cannot be done.”
    • Early signals that did not travel. The late May observations did not reach the leaders who handled the July 5 incident.

At the platform:

    • Exposed credentials. Fourteen working tokens with write access were publicly findable.
    • A data pipeline that could be made to run code. Uploaded datasets were processed in a way that let a crafted file read local secrets and then execute commands.
    • Broad standing access. One shared connector credential carried administrator rights across multiple clusters, and long-lived passwords and keys sat in the worker's environment.
    • An alert that did not page anyone. The detection tooling correlated the signals correctly but did not raise the severity enough to wake the on-call team.

What emerged during the incident

    • Agents coordinating without permission. They improvised a message board, divided up the work, and shared what they found.
    • Agents taking direction from each other. One agent paused over whether attacking an outside company was in scope. Another posted “GO,” and it continued.
    • Persistence. Each short-lived environment started from zero, and the agents rebuilt their tools and channels every time.
    • Signal buried in noise. Hugging Face’s first scan found few stolen secrets; decoding the agents’ own packaging turned up roughly four times as many.
    • Defenders locked out of their tools. The hosted commercial AI models the response team tried first refused to analyze the attack data. The team switched to a model running on its own infrastructure.

What held

This part matters just as much. Where access was narrow, the agents stalled. A list of approved web addresses blocked their first approach. Every attempt to change cloud resources was denied. The main production database accepted connections only from approved private addresses, and the agents never reached it. Their attempt to tamper with the software build process was blocked.

Five takeaways

Each takeaway from Part One has a direct counterpart in what the two companies reported.

  • No rule required either company to do what they have since done. Both now describe the same controls the OCC lists: isolation, monitoring, narrow permissions, and clear authority to stop a system.

  • This was a test, the kind of internal use most organizations would rank near the bottom for risk. The agents had reduced safeguards and an indirect route to the internet, which made it a top-tier risk in practice.

  • Nothing here needed a new risk category. Exposed credentials, excessive access, and unsafe data handling are cyber, third-party, and operational risks. AI amplified them.

  • The sandbox had been tested and validated. Monitoring tools existed but were not running on these evaluations. An alert fired but did not reach a person. Agents noted that an action was out of scope, then took it anyway.

  • The systems never went down in a way that forced the issue. The July 5 response restored service and resumed testing before anyone understood what the agents were doing. Afterward, Hugging Face had to reconstruct 17,600 actions to learn what had been touched.

The second takeaway deserves a pause. The OCC framework says a system’s tier should hold regardless of how well it performs in testing. This incident shows the mirror image: a system that exists only for testing can still carry top-tier consequences if it can reach something real.

Three lessons learned

Part One closed with three things you can do today. Here is each one again, applied to this incident with the benefit of hindsight. A fair caveat first: the incident began at the lab, so prevention sat mainly there. What the platform controlled was how far the agents got once they arrived.

1. Count and rank

Part One: list every AI use and rank it by authority to act, not by sophistication.

At the lab, the evaluation would have ranked near the top if judged by what its agents could reach. OpenAI’s own analysis found that its production safeguards could cut this behavior by more than 100 times, and that its monitoring would have paged security more than a day before the agents reached Hugging Face. Those protections were simply not turned on for a test.

At the platform, the equivalent is counting credentials. Fourteen exposed tokens and one shared administrator credential did most of the damage. An inventory of non-human identities, with what each one can touch, would likely have surfaced both.

2. Pull the plug on purpose

Part One: pick your highest-ranked use case and practice stopping it.

At the lab, the first signs appeared in late May and a formal incident opened on July 5. Testing resumed three days later. OpenAI has since set clear rules on who can stop a run, and now expects responders to pause the activity if they cannot rule out a false alarm within 30 minutes.

At the platform, the detection worked and the escalation did not. The intrusion ran through a weekend, and the alert did not page the on-call team. Hugging Face now pages a responder within minutes, any day of the week.

3. Read the access terms

Part One: check what your vendors' agents may do inside your systems, and how fast you will hear about an incident.

At the platform, the lesson is to narrow what any single credential can do. Hugging Face has since blocked workloads from reaching cloud metadata, moved to short-lived credentials, and issued a separate credential for each cluster. Had those limits been in place, the agents would likely have gained a foothold and little more.

Between the two companies, notice was the gap. Hugging Face disclosed on July 16 without knowing whose agents were responsible; OpenAI confirmed its involvement on July 21. For any organization relying on AI vendors, that is the reason to define an AI incident and a notice period in the contract before one occurs.

What this means for you

You do not need to be an AI lab, a technology platform, or a bank for this to apply. If your organization uses AI agents, or runs systems that outside agents can reach, three questions from this incident are worth asking this week.

    • Which of our “low-risk” AI uses can reach something real? Pilots, tests, and internal tools deserve the same ranking discipline as production systems.
    • If an alert fired on Saturday night, who would be paged, and could they stop the system? If the answer takes more than a sentence, practice it.
    • How much can one stolen credential do? Narrow access turns a potential disaster into a map with no keys. Broad access does the opposite.

The OCC framework put these questions in writing for bank examiners. The Hugging Face incident shows why they matter to everyone else. The weaknesses were ordinary, the fixes are well understood, and the agents will not wait for the next budget cycle.

In Part 3 of this series, we turn to encryption risk and the governance response needed to address emerging threats across the banking industry and beyond. Make sure you are subscribed to receive CohnReznick insights.

Related services

Our solutions are tailored to each client’s strategic business drivers, technologies, corporate structure, and culture.

Receive CohnReznick insights and event invitations on topics relevant to your business and role.
Subscribe
Any advice contained in this communication, including attachments and enclosures, is not intended as a thorough, in-depth analysis of specific issues. Nor is it sufficient to avoid tax-related penalties. This has been prepared for information purposes and general guidance only and does not constitute legal or professional advice. You should not act upon the information contained in this publication without obtaining specific professional advice specific to, among other things, your individual facts, circumstances and jurisdiction. No representation or warranty (express or implied) is made as to the accuracy or completeness of the information contained in this publication, and CohnReznick, its partners, employees and agents accept no liability, and disclaim all responsibility, for the consequences of you or anyone else acting, or refraining to act, in reliance on the information contained in this publication or for any decision based on it.

"CohnReznick" is the brand name under which CohnReznick LLP and CohnReznick Advisory LLC and their respective subsidiaries provide professional services. CohnReznick LLP and CohnReznick Advisory LLC (and their respective subsidiaries) practice in an alternative practice structure in accordance with the AICPA Code of Professional Conduct and applicable law, regulations, and professional standards. CohnReznick LLP is a licensed CPA firm that provides attest services to its clients. CohnReznick Advisory LLC provides tax and business consulting services to its clients. CohnReznick Advisory LLC and its subsidiaries are not licensed CPA firms.

member of nexia

CohnReznick is a member of Nexia, a leading, global network of independent accounting and consulting firms. Please see the “Member firm disclaimer (Opens a new window)” for further details.

© 2026 CohnReznick Advisory LLC, All Rights Reserved.