Researchers have discovered about 100 machine learning (ML) models that have been uploaded to the Hugging Face artificial intelligence (AI) platform and potentially enable attackers to inject malicious code onto user machines. The findings further underscore the growing threat that lurks when attackers poison publicly available AI models for nefarious activity.
The discovery of the malicious models by JFrog Security Research is part of ongoing research by the firm into how attackers can use ML models to compromise user environments, according to блог опубліковано цього тижня.
Specifically, JFrog developed a scanning environment to scrutinize model files uploaded to Hugging Face — a widely used, public AI model repository — to detect and neutralize emerging threats, particularly from code execution.
In running this tool, the researchers discovered that models loaded onto the repository were harboring malicious payloads. In one example, the scanner flagged a PyTorch model uploaded into a repository by a user named baller423 — an account that has since been deleted — that enables attackers to insert arbitrary Python code into a key process. This potentially could lead to malicious behavior when the model is loaded onto a user’s machine.
Hugging Face Payload Analysis
While typically payloads embedded within AI models uploaded by researchers aim to demonstrate vulnerabilities or showcase proofs-of-concept without causing harm, the payload uploaded by baller423 differed significantly, JFrog senior security researcher David Cohen wrote in the post.
It initiated a reverse shell connection to an actual IP address, 210.117.212.93, behavior that “is notably more intrusive and потенційно шкідливий, оскільки він встановлює пряме з’єднання із зовнішнім сервером, що свідчить про потенційну загрозу безпеці, а не просту демонстрацію вразливості», – написав він.
JFrog found that the IP address range belongs to Kreonet, which stands for “Korea Research Environment Open Network.” Kreonet serves as a high-speed network in South Korea to support advanced research and educational endeavors; therefore, it’s possible that AI researchers or practitioners may have been behind the model.
“However, a fundamental principle in security research is refraining from publishing real working exploits or malicious code,” a principle that was breached when the malicious code attempted to connect back to a real IP address, Cohen noted.
Moreover, shortly after the model was removed, the researchers encountered further instances of the same payload with varying IP addresses, one of which remains active.
Further investigation into Hugging Face uncovered some 100 potentially malicious models, highlighting the wider impact of the overall security threat from malicious AI models, which demands constant vigilance and more proactive security, Cohen wrote.
How Malicious AI Models Work
To understand how attackers can weaponize Hugging Face ML models requires an understanding of how a malicious PyTorch model like the one uploaded by baller423 works in the context of Python and AI development.
Code execution can happen when loading certain types of ML models — for example, a model that uses what’s called the “pickle” format, a common format for serializing Python objects. That’s because pickle files can also contain arbitrary code that is executed when the file is loaded, according to JFrog.
Loading PyTorch models with transformers, a common approach by developers, involves using the torch.load() function, which deserializes the model from a file. Particularly when dealing with PyTorch models trained with Hugging Face’s Transformers library, developers often employ this method to load the model along with its architecture, weights, and any associated configurations, according to JFrog.
Transformers, then, provide a comprehensive framework for natural language processing tasks, facilitating the creation and deployment of sophisticated models, Cohen observed.
“It appears that the malicious payload was injected into the PyTorch model file using the __reduce__ method of the pickle module,” he wrote. “This method enables attackers to insert arbitrary Python code into the deserialization process, potentially leading to malicious behavior when the model is loaded.”
While Hugging Face has a number of quality built-in security protections — including malware scanning, pickle scanning, and secrets scanning — it doesn’t outright block or restrict pickle models from being downloaded. Instead, it just marks them as “unsafe,” which means someone can still download and execute potentially harmful models.
Furthermore, it’s important to note that it’s not just pickle-based models that are susceptible to executing malicious code. For instance, the second-most prevalent model type on Hugging Face is Tensorflow Keras, which also can execute arbitrary code, even though it’s not as easy for attackers to exploit this method, according to JFrog.
Mitigating Risk from Poisoned AI Models
This isn’t the first time that researchers have found an AI security risk in Hugging Face, a platform where the ML community collaborates on models, data sets, and applications. Researchers at AI security startup Lasso Security previously said they were able to access Meta’s Bloom, Meta-Llama, and Pythia large language model (LLM) repositories using незахищені маркери доступу до API, які вони виявили на GitHub і Hugging Face платформа для розробників LLM.
The access would have allowed an adversary to silently poison training data in these widely used LLMs, steal models and data sets, and potentially execute other malicious activities.
Indeed, the growing existence of publicly available and thus potentially malicious AI/ML models poses a major risk to the supply chain, particularly for attacks that specifically target demographics such as AI/ML engineers and pipeline machines, according to JFrog.
To mitigate this risk, AI developers should use new tools available to them such as Huntr, a bug-bounty platform tailored specifically for AI vulnerabilities to enhance the security posture of AI models and platforms, Cohen wrote.
“This collective effort is imperative in fortifying Hugging Face repositories and safeguarding the privacy and integrity of AI/ML engineers and organizations relying on these resources,” he wrote.
- Розповсюдження контенту та PR на основі SEO. Отримайте посилення сьогодні.
- PlatoData.Network Vertical Generative Ai. Додайте собі сили. Доступ тут.
- PlatoAiStream. Web3 Intelligence. Розширення знань. Доступ тут.
- ПлатонЕСГ. вуглець, CleanTech, Енергія, Навколишнє середовище, Сонячна, Поводження з відходами. Доступ тут.
- PlatoHealth. Розвідка про біотехнології та клінічні випробування. Доступ тут.
- джерело: https://www.darkreading.com/application-security/hugging-face-ai-platform-100-malicious-code-execution-models
- : має
- :є
- : ні
- :де
- 100
- 210
- 212
- 7
- a
- Здатний
- МЕНЮ
- доступ
- За
- рахунки
- активний
- діяльності
- діяльність
- фактичний
- адреса
- адреси
- просунутий
- після
- AI
- Моделі AI
- Платформа AI
- AI / ML
- мета
- дозволено
- по
- Також
- an
- аналіз
- та
- будь-який
- API
- Доступ до API
- з'являється
- застосування
- підхід
- довільний
- архітектура
- ЕСТЬ
- штучний
- штучний інтелект
- Штучний інтелект (AI)
- AS
- асоційований
- At
- нападки
- спробував
- доступний
- назад
- оскільки
- було
- поведінка
- за
- буття
- належить
- Блокувати
- Блог
- Цвісти
- вбудований
- by
- званий
- CAN
- викликаючи
- певний
- ланцюг
- код
- Cohen
- співпрацює
- Collective
- COM
- загальний
- співтовариство
- всеосяжний
- компроміс
- З'єднуватися
- зв'язку
- постійна
- містити
- контекст
- може
- створення
- дані
- набори даних
- Девід
- справу
- запити
- Демографічна
- демонструвати
- розгортання
- виявляти
- розробників
- прямий
- відкритий
- відкриття
- байдуже
- скачати
- легко
- освітній
- зусилля
- вбудований
- з'являються
- включіть
- дозволяє
- зусиль
- Інженери
- підвищувати
- Навколишнє середовище
- середовищах
- встановлює
- Навіть
- приклад
- виконувати
- виконано
- виконання
- виконання
- існування
- Експлуатувати
- подвигів
- зовнішній
- Face
- сприяння
- філе
- Файли
- результати
- Фірма
- Перший
- перший раз
- позначений прапором
- для
- формат
- знайдений
- Рамки
- від
- функція
- фундаментальний
- далі
- GitHub
- Зростання
- траплятися
- шкодити
- шкідливий
- Мати
- he
- виділивши
- Як
- Однак
- HTTPS
- Impact
- імператив
- важливо
- in
- У тому числі
- вказуючи
- розпочатий
- вводити
- екземпляр
- замість
- цілісність
- Інтелект
- в
- настирливий
- дослідження
- включає в себе
- IP
- IP-адреса
- IP-адреси
- isn
- IT
- ЙОГО
- JPG
- просто
- керас
- ключ
- Корея
- мова
- великий
- вести
- провідний
- вивчення
- бібліотека
- як
- LLM
- загрузка
- погрузка
- машина
- навчання за допомогою машини
- Машинки для перманенту
- основний
- malicious
- шкідливих програм
- Може..
- засоби
- меров
- Meta
- метод
- Пом'якшити
- пом’якшення
- ML
- модель
- Моделі
- Модулі
- більше
- Названий
- Природний
- Обробка природних мов
- мережу
- Нові
- особливо
- увагу
- зазначив,
- номер
- об'єкти
- of
- часто
- on
- ONE
- постійний
- на
- відкрити
- відкрита мережа
- or
- організації
- Інше
- відверто
- частина
- особливо
- трубопровід
- платформа
- Платформи
- plato
- Інформація про дані Платона
- PlatoData
- отрута
- позах
- це можливо
- пошта
- потенціал
- потенційно
- поширений
- раніше
- принцип
- недоторканність приватного життя
- Проактивний
- процес
- обробка
- забезпечувати
- громадськість
- публічно
- опублікований
- Видавничий
- Python
- піторх
- якість
- діапазон
- швидше
- реальний
- покладаючись
- залишається
- Вилучено
- Сховище
- Вимагається
- дослідження
- дослідник
- Дослідники
- ресурси
- обмежити
- зворотний
- позбавлений
- Risk
- біг
- s
- захист
- Зазначений
- то ж
- сканування
- секрети
- безпеку
- запуск безпеки
- старший
- сервер
- служить
- набори
- Склад
- Незабаром
- Повинен
- демонстрації
- істотно
- з
- деякі
- Хтось
- складний
- Південь
- South Korea
- конкретно
- Рекламні
- стенди
- введення в експлуатацію
- Як і раніше
- такі
- поставка
- ланцюжка поставок
- підтримка
- схильний
- з урахуванням
- Мета
- завдання
- тензорний потік
- ніж
- Що
- Команда
- Їх
- потім
- отже
- Ці
- вони
- це
- На цьому тижні
- хоча?
- загроза
- загрози
- Таким чином
- час
- до
- Жетони
- інструмент
- інструменти
- факел
- навчений
- Навчання
- Трансформатори
- тип
- Типи
- типово
- непокритий
- підкреслювати
- розуміти
- розуміння
- завантажено
- використання
- використовуваний
- користувач
- використовує
- використання
- різний
- пильність
- Уразливості
- вразливість
- було
- week
- були
- Що
- коли
- який
- широко
- ширше
- з
- в
- без
- Work
- робочий
- працює
- б
- пише
- зефірнет