AIToday
Large Language ModelsAI Safety & AlignmentITmedia AI+Published: Jul 20, 2026, 13:00 JST

Hugging Face attacked by AI agents; switches to open-weights GLM 5.2 model to defend

Hugging Face attacked by AI agents; switches to open-weights GLM 5.2 model to defend

3 Key Points

  1. What happened

    On July 16, Hugging Face, an AI platform, disclosed that part of its infrastructure was targeted by AI-driven cyberattacks. After initially attempting to defend using AI, the company found that commercial models refused to analyze attack patterns due to safety guardrails. Hugging Face ultimately deployed Zhipu.ai's open-weights model GLM 5.2 on its infrastructure to respond to the attack.

  2. Why it matters

    The incident shows that commercial AI models' safety restrictions can hinder real-time security response. By contrast, open-weights models without such guardrails can be deployed directly on infrastructure for faster incident response—but this creates a tension between security and safety that organizations must navigate carefully.

  3. What to watch

    Hugging Face has deployed additional protections including access token rotation, account activity logs, and node-level isolation. The company is also providing security research tools and has reported the incident to authorities, but the reliance on open-weights models for defense underscores an emerging gap in commercial AI security capabilities.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The incident reflects a fundamental tension in AI security. Commercial AI providers—OpenAI, Anthropic, and others—have built safety guardrails into their models to prevent misuse, including analysis of exploit techniques and attack payloads. These safeguards are intentional and well-justified for general use. However, when a cloud platform's own infrastructure comes under attack, real-time forensic analysis of attacker behavior becomes a critical business function, and safety guardrails can block the very queries needed to mount an effective defense.

Hugging Face's turn to an open-weights model reveals the trade-off organizations face. Open-weights models deployed on a company's own servers can be queried without restrictions, enabling rapid incident response—but at the cost of losing the safety oversight that commercial models provide. The company's reliance on Zhipu.ai's GLM 5.2, a model without commercial API restrictions, allowed faster analysis but also highlights that organizations managing sensitive infrastructure may need to maintain security-focused AI tools separate from public-facing services.

FAQ
What was the attack targeting on Hugging Face?
The attack exploited data pipelines on the platform's infrastructure. It also affected some model datasets, service usage billing records, and user account information stored on the platform.
Why didn't Hugging Face use commercial AI models to defend?
Commercial models like those available via commercial APIs had guardrails that blocked requests to analyze attack patterns and payload details, as these requests violated safety policies. The guardrails prevented the required security analysis.
What model did Hugging Face use to respond to the attack?
Hugging Face deployed Zhipu.ai's open-weights model GLM 5.2 on its infrastructure to analyze attack patterns and mount a defense.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleApple briefly tops Nvidia as world's most valuable company