CVE-2026-79784: Vocos Model-Loading Framework Exposes Arbitrary Class Instantiation RCE — AI Model Supply Chain Sounds the Alarm Again
AI audio framework Vocos disclosed CVE-2026-79784 (CVSS 8.8). A malicious Hugging Face config.yaml can instantiate arbitrary Python classes at load time and execute arbitrary code.
Incident Overview
On 25 August 2026, researchers disclosed a high-severity bug in the AI audio model framework Vocos: CVE-2026-79784, CVSS v3.1 8.8, CWE-749: Exposed Dangerous Method or Function. Vocos is widely used for TTS, voice cloning, and audio codec work. It is the core backend for several star speech-synthesis models on Hugging Face (WavLLM, Vall-E series, and others). The bug is in `instantiate_class` in `vocos/pretrained.py`. A Hugging Face repo owner can set arbitrary `class_path` and `init_args` in `config.yaml`. When a user calls `Vocos.from_pretrained()`, arbitrary Python runs. After the early-August ChainDrop / Shai-Hulud npm worm, this is another classic model supply-chain attack surface.
Technical Details
Vocos exposes `from_pretrained()`. It pulls `config.yaml` from Hugging Face and instantiates model components. Execution path:
# vocos/pretrained.py (simplified)
def instantiate_class(class_path, init_args):
module_path, attr = class_path.rsplit(".", 1)
module = importlib.import_module(module_path)
cls = getattr(module, attr)
return cls(**init_args)
# Vocos.from_pretrained call chain
config = load_config(repo_id) # pull config.yaml from Hugging Face
feature_extractor = instantiate_class(config["feature_extractor"]["class_path"],
config["feature_extractor"]["init_args"])
backbone = instantiate_class(config["backbone"]["class_path"],
config["backbone"]["init_args"])
head = instantiate_class(config["head"]["class_path"],
config["head"]["init_args"])
The defect: `class_path` has no allowlist. When a user loads a malicious Hugging Face repo, the owner points `config.yaml` at any Python callable, including `os.system`, `subprocess.Popen`, `shutil.rmtree`, `urllib.request.urlretrieve`, and other dangerous system calls. Trigger conditions:
- CVSS AV:N — fires at model-download time (network-reachable)
- CVSS AC:L — no complex bypass; set `class_path`
- CVSS PR:N — no auth on the Vocos side
- CVSS UI:R — user must call `from_pretrained`, which is the normal load interaction
- CVSS C/I/A all High — attacker can run commands, read/write files, and fetch follow-on payloads
Impact Assessment
From an attack-surface view, CVE-2026-79784 aligns with recent model/package supply-chain incidents:
- Model hosting: Hugging Face WavLLM, Vocos, ESPnet and other mainstream speech models total hundreds of thousands of daily downloads; one `config.yaml` tamper hits global downstream users
- Enterprise AI teams: research, prod, and CI/CD often auto-load models in init scripts; payload can run on CI runners or prod GPU hosts
- Research and education: researchers often `from_pretrained()` arbitrary repos when evaluating new models — high-risk population
- POC status: no public PoC as of publication; researcher description is explicit; experienced attackers typically go from no PoC to exploit in under 72 hours
- Lateral risk: infected env can run arbitrary Python; downstream use includes miners, backdoors, credential theft, SSH key replacement
- Compliance: finance, healthcare, government must put AI model loads under change control and SBOM audit; this bug shows model-is-code must land in real process
Remediation
- Official patch: wait for Vocos to add a `class_path` allowlist in `pretrained.py`, or restrict `instantiate_class` to registered types. Short term: load only from official repo URLs. Do not trust shared `repo_id` values.
- Sandboxed load: load models in containers, gVisor, Firecracker on CI/CD, training hosts, inference servers. Apply seccomp, AppArmor, Landlock on `from_pretrained` calls.
- Dependency audit: put Vocos, transformers, Hugging Face Hub in the SBOM. Continuous scan with `pip-audit`, `safety`, `pip-audit --strict`.
- Hugging Face upstream governance: block org users from downloading public-repo models; use enterprise private Hub or a reviewed allowlist. Enable official signature verify on external model repos (Hub already supports Sigstore).
- Runtime detection: Falco, Tetragon, or other eBPF tools watching for `os.system`, `subprocess`, `socket.connect` during model load. Hard SIEM alert on anomalous egress in the 60 seconds after model load.
- Credential hygiene: short-lived OIDC tokens in CI/CD; no long-lived IAM keys on disk. Isolate Hugging Face creds from prod SSH creds; separate vault namespaces.
- Developer endpoints: same lesson as ChainDrop — developer workstations need production-grade EDR and egress monitoring so a model-load action cannot be an indirect break-in.
Detection Rules
# Host layer (auditd) — anomalous commands spawned by the model-loading process
auditctl -w /usr/bin/python3 -p x -k vocos_loading
ausearch -k vocos_loading -ts recent | grep -E 'execve.*(curl|wget|nc|bash|sh|ssh)'
# Network layer — anomalous outbound traffic during the model-download phase
tcpdump -i any -nn 'src host <training-host> and not dst net 10.0.0.0/8 and not dst net 172.16.0.0/12'
# Application layer — brief shell activity around Vocos.from_pretrained
strace -f -e trace=execve -p <pid> 2>&1 | grep -E 'class_path|init_args|/bin/(ba)?sh'
# SBOM-level dependency monitoring
pip-audit --strict -r requirements.txt | grep -i vocos
References
- The Hacker Wire: CVE-2026-79784 Vocos arbitrary class instantiation RCE
- Hugging Face Hub Security docs
- Vocos GitHub repo