/

CVE-2026-134172

Severity:

HIGH RISK

(7.8)

Unsafe Deserialization (CWE-502) in audio-separator

CVE-2026-134172

Received

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

audio-separator can execute attacker-controlled code when it loads a malicious Demucs .th model using torch.load with weights_only=False. The risk arises when an attacker can place or supply an untrusted model and a victim runs Demucs separation with it.

Affected context

The issue affects audio-separator workflows that load Demucs .th model files through an unsafe PyTorch deserialization path. Risk depends on whether an untrusted party can write to the shared /tmp/audio-separator-models/ directory or influence the source of downloaded models, and whether a victim subsequently loads the model for separation.

Exploit preconditions

  • Attack surface: Local model files or model download sources used by audio-separator
  • Required access: Ability to write to the shared default model directory or control an unverified model source
  • Trigger point: A victim runs Demucs separation and loads the supplied .th model
  • Why exploitation is possible: Deserialization with weights_only=False can reconstruct attacker-controlled objects and execute code during model loading

Why this happens

The underlying bug is unsafe deserialization of model data. Using torch.load with weights_only=False on a file that may be attacker-controlled allows more than passive tensor loading: deserialization can invoke object reconstruction behavior. This maps to CWE-502: Deserialization of Untrusted Data.

Potential impact

  • An attacker could execute code with the privileges of the process loading the model.
  • The audio-separator environment may be compromised.
  • Local files or credentials accessible to the process could be exposed or modified.
  • A compromised environment could be used for further activity, depending on its permissions and network access.

General mitigation guidance

Defensive patterns include:

  • Prefer restricted, weights-only model loading or other formats and APIs that do not permit arbitrary object reconstruction.
  • Treat downloaded and locally supplied model files as untrusted unless their origin and integrity are verified.
  • Avoid shared writable model directories; use controlled ownership and permissions or isolated per-user storage.
  • Run separation processes with least privilege and limit their access to sensitive files and services.
  • Apply validation and integrity checks before model loading, while recognizing that validation alone does not make unsafe deserialization safe.

How teams detect issues like this

  • Use static analysis to identify model-loading calls that allow unrestricted deserialization, including torch.load configurations that disable weights-only restrictions.
  • Review code paths that load models from temporary directories, shared locations, or downloads without integrity checks.
  • Enforce policies that require restricted model-loading modes and trusted model provenance.
  • Monitor model directories and download workflows for unexpected file creation or changes; automated code review tools may help flag risky loading patterns.

Sources

SourceLink
github.comgithub.com/nomadkaraoke/python-audio-separator/blob/465b60f0271e880a7289a2c9aaeb13817c3b2bed/audio_separator/separator/separator.py#L126
github.comgithub.com/nomadkaraoke/python-audio-separator/blob/465b60f0271e880a7289a2c9aaeb13817c3b2bed/audio_separator/separator/uvr_lib_v5/demucs/states.py#L43
github.comgithub.com/nomadkaraoke/python-audio-separator/commit/6d7d3fd60accda60c7ad8807ce5731022475dcf3
github.comgithub.com/nomadkaraoke/python-audio-separator/pull/316
github.comgithub.com/nomadkaraoke/python-audio-separator/releases/tag/v0.47.2
vulncheck.comvulncheck.com/advisories/audio-separator-before-0.47.2-rce-via-unsafe-pickle-deserialization-of-demucs-models

Frequently asked

questions

The described paths require an attacker to control a model source or write to the shared local model directory. Remote reachability depends on how models are obtained and whether an attacker can influence that source.

They need a way to provide or place a malicious Demucs .th file. A victim must then load it during a separation run.

Use restricted model-loading APIs that do not allow arbitrary object reconstruction, and verify model provenance and integrity.

Treat model files as untrusted input, avoid shared writable storage, enforce trusted-source policies, and run model-processing workloads with least privilege.

Find out what's already
exploitable in your codebase.