/

CVE-2026-85696

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-78) in SadTalker Video Mux

CVE-2026-85696

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.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

SadTalker contains a critical OS command injection vulnerability in its video muxing workflow. When an uploaded audio filename is incorporated into an ffmpeg command without adequate escaping, an attacker may execute arbitrary system commands when video generation processes that file.

Affected context

The vulnerability occurs in SadTalker's video generation and muxing process when uploaded audio files are passed to ffmpeg. Risk is present where an attacker can upload or otherwise control an audio filename and the application constructs a shell command using that filename without treating it strictly as data.

Exploit preconditions

  • Attack surface: Audio upload and video generation functionality
  • Required access: Ability to submit or upload an audio file with a controllable filename
  • Trigger point: The video muxing step that invokes ffmpeg
  • Why exploitation is possible: Filename content is interpolated into a command context without sufficient argument isolation or shell-safe handling

Why this happens

The underlying bug is command construction from untrusted filename data. When application-controlled values are concatenated into a shell command, shell metacharacters and command syntax may alter the intended command structure rather than remain a literal filename.

This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly called OS command injection. The insecure pattern is treating externally influenced file metadata as trusted command syntax.

Potential impact

  • Attackers may execute arbitrary operating-system commands under the application's account.
  • The application host or processing worker could be compromised.
  • Sensitive files, credentials, or environment variables may be exposed.
  • Attackers could modify generated media, application data, or system configuration.
  • A compromised worker could be used for lateral movement or further infrastructure attacks.

General mitigation guidance

Mitigation generally focuses on eliminating shell interpretation and reducing trust in uploaded metadata.

Common defensive patterns include:

  • Invoke ffmpeg through a process API that passes arguments as a structured list rather than constructing a shell command.
  • Avoid shell execution wrappers unless shell behavior is explicitly required and tightly controlled.
  • Generate server-side temporary filenames instead of using user-supplied names in command arguments.
  • Apply strict filename validation and normalize or reject unexpected characters before any filesystem or process use.
  • Restrict ffmpeg and worker permissions through least-privilege service accounts, isolated working directories, and constrained filesystem access.
  • Treat uploaded files and their metadata as untrusted throughout the processing pipeline.

How teams detect issues like this

Organizations can look for command injection risks through:

  • Static analysis rules identifying string interpolation, concatenation, or formatting near shell execution and subprocess APIs.
  • Code review checks for user-controlled filenames or paths passed to media-processing tools.
  • Runtime monitoring of child-process creation, unexpected shells, unusual ffmpeg arguments, and commands launched by media workers.
  • Application policies that require structured process invocation and prohibit shell evaluation for untrusted values.
  • Automated security review tools that flag tainted data flowing from upload handlers into command execution.

Sources

SourceLink
github.comgithub.com/OpenTalker/SadTalker
github.comgithub.com/OpenTalker/SadTalker/blob/v0.0.2/src/utils/videoio.py
github.comgithub.com/OpenTalker/SadTalker/issues/1043
vulncheck.comvulncheck.com/advisories/sadtalker-os-command-injection-via-audio-filename

Frequently asked

questions

It may be remotely exploitable when SadTalker exposes audio upload and video generation to an attacker, because the attacker-controlled filename is processed by the server.

The attacker generally needs access to an upload or equivalent workflow that accepts a controllable audio filename and triggers video generation. Authentication requirements depend on the application's deployment and access controls.

The safest pattern is to avoid shell interpretation and pass ffmpeg arguments through a structured process interface, using server-generated filenames and strict validation for any remaining external input.

Treat filenames and other upload metadata as untrusted, use secure subprocess APIs, apply least privilege to processing workers, and combine code review with static and runtime detection for unsafe command construction.

Find out what's already
exploitable in your codebase.