AI Attacked and Defended in the Same Breach: What the OpenAI–Hugging Face Incident Reveals About Security Governance
Tom Kinnaird
Head of Security Product Engineering
Key takeaways
- AI worked both sides of a live security event, one AI system ran the intrusion, and AI-assisted monitoring helped detect it.
- The real lesson is asymmetry. The evaluation was conducted with reduced cyber restrictions to measure unrestricted capability, while defenders reported encountering safety-related restrictions when analysing the incident. Whether that asymmetry is desirable is now a governance question, not merely a technical one.
- Hugging Face carried operational cost: detection, containment, forensic analysis, and user notification, before OpenAI attributed the activity to its own evaluation.
- Guardrails should stay. What's missing is a governed access model that lets verified, accountable defenders work with attack material during a live incident.
- Scope is the fix: the same authorisation and scope discipline that governs professional penetration testing should govern AI capability evaluations too.
The OpenAI x Hugging Face incident is curious because AI operated on both sides of a live security event. One AI system conducted the intrusion, while AI-assisted monitoring helped identify it. The harder lesson is the imbalance between offensive testing and defensive response. OpenAI ran a cyber-capability evaluation with its safety classifiers deliberately reduced to measure unrestricted capability. Hugging Face, responding to activity in its production environment, found that hosted frontier models refused some of the attack material because of their built-in safety controls. One side could remove restrictions for research; the other could not remove them for incident response. That asymmetry is the problem.
Detection without attribution
Hugging Face disclosed the incident on 16 July 2026, having already identified and contained the intrusion but without naming a provider or model. OpenAI followed five days later, attributing the activity to an internal evaluation involving GPT-5.6 Sol and an unreleased model.
By then, Hugging Face had done the operational work: detection, containment, forensic analysis, user communication, and law-enforcement engagement, and absorbed the reputational hit of disclosing a breach. OpenAI later acknowledged its role, but the initial response costs fell unevenly. When an internal AI evaluation reaches a third party, who is in control, and who owns the consequences?
AI-assisted defence, constrained by policy
Hugging Face runs LLM-based triage over its security telemetry, so AI-assisted monitoring helped detect activity generated by another AI system, an early case of machine-speed attack and defence in one incident.
It also exposed a limit. Forensic analysis needed exploit payloads, commands, and command-and-control artefacts. These are legitimate inputs for an incident response team, but to a general-purpose safety classifier they can look identical to malicious requests. The refusals were understandable and the controls worked as designed, they just didn't account for authorised defensive use. Hugging Face fell back to an open-weight model on its own infrastructure, keeping responders in control and sensitive telemetry, credentials, and attacker data in-house. But that exposes a dependency: defenders using hosted models rely on the provider's policy at the very moment they need the most flexibility.
Guardrails remain.
This isn't an argument for removing safeguards. Offensive and defensive security work often use the same techniques, commands, and artefacts, so providers can't trust stated intent alone, and unrestricted access would create obvious risk. The better answer is a governed access model for trusted defensive users, built on:
- verified identity and organisational authority
- explicit terms of use
- comprehensive logging
- strong data-handling controls
- auditable scope, with clear consequences for misuse
The aim is to separate authorised incident response from general-purpose access, not force both through the same controls. For defenders, a refusal isn't trivial – during a live incident it delays analysis, adds manual work, and blocks tools that speed up response.
Scope is fundamental
Professional penetration testing offers the comparison. At Claranet, as across the security testing industry, authorisation and scope define the work. A penetration test can involve actions that would otherwise be unlawful, but only because the customer has given clear permission within agreed boundaries target systems, testing window, permitted techniques, data handling, escalation paths, and stop conditions. Move beyond that scope and good intent doesn't make the activity authorised.
The same principle should apply to AI capability evaluations. Once an evaluation reaches a third party's production environment, the questions follow:
- What technical controls were meant to stop that boundary being crossed?
- Who approved the risk of disabling safety systems?
- What stop conditions were in place?
- Who owns the cost and impact when containment fails?
Model autonomy may complicate attribution, but it doesn't remove organisational responsibility. People chose the model, designed the evaluation, configured the safeguards, and approved the environment. The model taking the action doesn't make the impact ownerless.
The cost fell unevenly
OpenAI did face consequences: it acknowledged the incident, disclosed a vulnerability in its own infrastructure, tightened controls, and escalated through governance. But the costs landed unevenly. Hugging Face contained the incident, ran the investigation, notified users, and recommended credential rotation, OpenAI's later disclosure necessarily became a significant part of the public narrative surrounding the incident. Post-incident disclosure is only part of accountability. When a controlled evaluation causes harm outside the organisation running it, there should be a clear framework for third-party notification, cost recovery, and independent review.
What should change
Three areas need work:
- Trusted defensive access. Security teams need controlled ways to use capable models for live incident response, without being blocked by controls built for general users.
- Stronger evaluation containment. Classifier-off testing may be necessary for capability research, but pair it with technical and procedural controls designed around autonomous boundary crossing.
- Clearer accountability. Organisations running high-risk evaluations should decide in advance who is responsible if the test hits external systems, and how affected parties are notified and supported.
The real lesson isn't that AI can attack and defend at machine speed. It's that the organisations measuring offensive capability may have more freedom than the defenders responding to it. That imbalance is manageable – but only if defensive access, evaluation scope, and third-party accountability are treated as one security problem.
Hugging Face Disclosure - July 2026
OpenAI response - July 2026
