CIO Influence
CIO Influence News Machine Learning Security

Pillar Security Uncovers Novel Attack Vector That Embeds Malicious Backdoors in Model Files on Hugging Face

Pillar Security Uncovers Novel Attack Vector That Embeds Malicious Backdoors in Model Files on Hugging Face

Group 1410190061 (4).png

New supply chain vulnerability in popular GGUF model format allows attackers to embed malicious instructions that bypass existing AI security controls.

Pillar Security, a leading company in AI security, discovered a novel supply chain attack vector that targets the AI inference pipeline. This novel technique, termedย “Poisoned GGUF Templates,”ย allows attackers to embed malicious instructions that are processed alongside legitimate inputs, compromising AI outputs.

The vulnerability affects the widely used GGUF (GPT-Generated Unified Format), a standard for AI deployment with over 1.5 million files distributed on public platforms like Hugging Face. By manipulating these templates, which define the conversational structure for an LLM, attackers can create a persistent compromise that affects every user interaction while remaining invisible to both users and security systems.

โ€œWeโ€™re still in the early days of understanding the full range of AI supply chain security considerations,โ€ said Ziv Karliner, CTO and Co-founder of Pillar Security. โ€œOur research shows how the trust that powers platforms and open-source communitiesโ€”while essential to AI progressโ€”can also open the door to deeply embedded threats. As the AI ecosystem matures, we must rethink how AI assets are vetted, shared, and secured.โ€

Also Read:ย Emerging IT Trends And Technologies Every CIO Should Stay Ahead Of

How the “Poisoned GGUF Template” Attack Works

This attack vector exploits the trust placed in community-sourced AI models and the platforms that host them. The mechanism allows for a stealthy, persistent compromise:

  • Attackers embed malicious, conditional instructions directly within a GGUF fileโ€™s chat template, a component that formats conversations for the AI model.
  • The poisoned model is uploaded to a public repository. Attackers can exploit the platformโ€™s UI to display a clean template online while the actual downloaded file contains the malicious version, bypassing standard reviews.
  • The malicious instructions lie dormant until specific user prompts trigger them, at which point the model generates a compromised output.

“What makes this attack so effective is the disconnect between what’s shown in the repository interface and what’s actually running on usersโ€™ machines,” added Pillarโ€™s Ariel Fogel, who led the research. “It remains undetected by casual testing and most security tools.”

Also Read:ย CIO Interview with Ramprakash Ramamoorthy, Director of AI Research, ManageEngine

The AI Inference Pipeline: A New Attack Surface

The โ€œPoisoned GGUF Templatesโ€ attack targets a critical blind spot in current AI security architectures. Most security solutions focus on validating user inputs and filtering model outputs, but this attack occurs in the unmonitored space between them.

Because the malicious instructions are processed within the trusted inference environment, the attack evades existing defenses like system prompts and runtime monitoring. An attacker no longer needs to bypass the front door with a clever prompt; they can build a backdoor directly into the model file. This capability redefines the AI supply chain as a primary vector for compromise, where a single poisoned model can be integrated into thousands of downstream applications.

Responsible Disclosure

Pillar Security followed a responsible disclosure process, sharing its findings with vendors, including Hugging Face and LM Studio, in June 2025. The responses indicated that the platforms do not currently classify this as a direct platform vulnerability, placing the responsibility of vetting models on users. This stance highlights a significant accountability gap in the AI ecosystem.

Mitigation Strategies

The primary defense against this attack vector is the direct inspection of GGUF files to identify chat templates containing uncommon or non-standard instructions. Security teams should immediately:

  • Audit GGUF Files:ย Deploy practical inspection techniques to examine GGUF files for suspicious template patterns. Look for unexpected conditional logic (if/else statements), hidden instructions, or other manipulations that deviate from standard chat formats.
  • Move Beyond Prompt-Based Controls:ย This attack fundamentally challenges current AI security assumptions. Organizations must evolve beyond a reliance on system prompts and input/output filtering toward comprehensive template and processing pipeline security.
  • Implement Provenance and Signing:ย A critical long-term strategy is to establish model provenance. This can include developing template allowlisting systems to ensure only verified templates are used in production.

The Pillar platform discovers and flags malicious GGUF files and other types of risks in the template layer.

[To share your insights with us as part of editorial or sponsored content, please write toย psen@itechseries.com]

Related posts

Query Secures Strategic Funding from Cisco Investments to Enhance Federated Search for Security Operations

EIN Presswire

FireMon and Exclusive Networks Forge Partnership to Enhance Global Network Security Management

Business Wire

ABN AMRO Engages Kyndryl And IBM to Help Modernize its IT Operating Model to Enable Public Cloud, Agile and DevOps in Pursuit of its Strategy to Become a Personal Bank in the Digital Age

CIO Influence News Desk