Исследователи Pluto Security описали кампанию против хостов с self-hosted инференсом. С сентября на Hugging Face вышло две волны: всего 31 вредоносный репозиторий в семи аккаунтах. Вторая волна, 19 репозиториев под новыми аккаунтами, появилась через несколько дней после удаления первой.
Как устроено
Репозитории выдают себя за маленькие тестовые чекпойнты Qwen2, но настоящей модели внутри нет. Вместо отравленных весов или pickle-эксплойтов используется опция trust_remote_code: с ней модель при загрузке исполняет собственный Python-код. Цели — серверы Xinference и GPUStack с GPU.
Нагрузка — майнер под видом системного процесса Linux. Он перезапускается после остановки и убивает конкурирующие майнеры. Часть версий открывает reverse shell, а в одной из поздних нашёлся скрипт выхода из контейнера на хост.
Флагманская модель MENXIANGYU/qwen2-tiny к 28 октября набрала 28 412 загрузок, всего с копиями — более 32 000. Это загрузки, а не подтверждённые заражения. По данным Pluto, сканеры Hugging Face код пропустили, а почти идентичная копия htt0118/qwen2-tiny на момент публикации ещё была доступна. Оператор, судя по всему, финансово мотивирован.
Что делать
- Не включать
trust_remote_codeдля моделей из непроверенных аккаунтов. В инференс-серверах держать allowlist моделей. - Машину, загрузившую эти модели, считать скомпрометированной: убить майнер мало, бэкдоры остаются.
- Сверить хосты с индикаторами из отчёта Pluto и сменить доступные с них учётные данные.
Pluto Security researchers described a campaign against self-hosted inference hosts. Since September two waves have appeared on Hugging Face: 31 malicious repositories across seven accounts. The second wave, 19 repos under new accounts, showed up days after the first was removed.
How it works
The repos pose as tiny Qwen2 test checkpoints but contain no real model. Rather than poisoned weights or pickle exploits, they abuse trust_remote_code, which lets a model run its own Python code on load. Targets are GPU servers running Xinference and GPUStack.
The payload is a miner disguised as a Linux system process that restarts when killed and removes competing miners. Some versions also open a reverse shell, and a later one shipped a container-escape script to take over the host.
The flagship MENXIANGYU/qwen2-tiny reached 28,412 downloads by 28 October, over 32,000 including copies; these are downloads, not confirmed infections. Pluto says Hugging Face’s scanners missed the code, and a near-identical copy, htt0118/qwen2-tiny, was still live at publication. The operator appears financially motivated.
What to do
- Don’t enable
trust_remote_codefor models from unvetted accounts; keep a model allowlist on inference servers. - Treat any machine that loaded these models as compromised: killing the miner leaves the backdoors.
- Check hosts against Pluto’s indicators and rotate credentials they could reach.