2,428 downloads
A novel malware distribution campaign has been uncovered on the Hugging Face AI model repository, a popular platform for sharing and downloading machine learning models. Researchers found at least five malicious Large Language Models (LLMs) in the GGUF format that contained a hidden Windows Remote Access Trojan (RAT), nicknamed "ollie." The models were downloaded a combined 2,428 times before being taken down. The attack used a clever two-stage mechanism where the malware was first hidden inside the model file and then activated days later by modifying the model's chat template to include a malicious PowerShell command, which the user would have to copy and execute manually.
The primary campaign was orchestrated by a Hugging Face user account named 'Mir2k.' The threat actor used a two-part attack:
llama.cpp only read the required model weights, the extra data at the end of the file is ignored, and the model functions normally, making the payload dormant and difficult to detect.chat_template for these models. The template was altered to prepend a one-line PowerShell command to every response generated by the LLM. If a user copied the full response, including the malicious command, and pasted it into a PowerShell terminal, the command would execute. This command was designed to find the model file on the user's disk, extract the hidden 'ollie' RAT, and run it.A smaller, secondary campaign by a user named 'timdedid' used a similar template-poisoning technique to trick AI coding agents into executing malicious scripts. Hugging Face has since disabled all five malicious repositories.
This attack represents an emerging threat vector targeting the growing community of AI developers and hobbyists running models locally.
T1195.002 - Compromise Software Supply Chain: By uploading malicious models to a trusted public repository, the attackers are abusing the AI supply chain.T1059.001 - PowerShell: The execution of the malware is triggered by a PowerShell command, a common technique for fileless attacks and payload execution.T1555.003 - Credentials from Password Stores: The 'ollie' RAT is capable of stealing saved credentials from web browsers.T1552.001 - Credentials In Files: The RAT also targets cryptocurrency wallet data stored on the victim's machine.T1496 - Resource Hijacking: The malware includes a module for mining Monero cryptocurrency, abusing the victim's system resources.The attack relies on social engineering, as the user must manually copy and execute the PowerShell command. However, in the context of interacting with LLMs, users frequently copy and paste code snippets, making this a plausible infection vector.
Users who downloaded and ran these malicious models are at risk of significant data theft and system compromise. The impact includes:
In response to the findings, the security researchers have released an open-source tool called gguf-radar to help users scan GGUF model files for hidden executable content.
No specific file hashes or C2 domains were mentioned in the source articles. The primary indicators are the threat actor account names.
user_agentMir2kuser_agenttimdedidUsers of local LLMs can look for the following signs:
command_line_patternpowershell -Command ...process_namepowershell.exepowershell.exe processes spawning from your LLM application or terminal.network_traffic_patternothergguf-radar toolgguf-radar tool to scan downloaded .gguf files for suspicious appended data.Detection:
gguf-radar to scan all downloaded models before use.Response:
M1017 - User Training: The most critical mitigation is user awareness. Users should be trained to treat AI-generated code with the same suspicion as code from any untrusted internet source.M1038 - Execution Prevention: Configure PowerShell execution policies to be more restrictive, preventing the running of unsigned or untrusted scripts.M1049 - Antivirus/Antimalware: Keep security software up to date to detect the RAT payload if it is successfully extracted and executed.Educate users to be skeptical of code generated by AI models and to never execute commands from untrusted sources without careful inspection.
Use restrictive PowerShell execution policies and application control to prevent untrusted scripts from running.
Deploy endpoint security solutions that can detect and block known RATs and crypto-mining malware.
Threat actor 'Mir2k' modifies the chat templates of previously uploaded models to include a malicious PowerShell command.
Security researchers publish their findings on the malicious GGUF models.
Hugging Face disables the five malicious model repositories.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.