CVE-2025-12343
Ffmpeg vulnerability analysis and mitigation

Overview

CVE-2025-12343 is a double-free vulnerability in FFmpeg's TensorFlow DNN backend, specifically within the dnn_execute_model_tf() function in libavfilter/dnn_backend_tf.c. The flaw causes a task object to be freed multiple times under certain error-handling paths, leading to memory corruption and a denial-of-service condition. It affects FFmpeg versions 6.1 through 8.1 (exclusive). The vulnerability was first reported on October 27, 2025, and carries a CVSS v3.1 base score of 5.5 (Medium) (Red Hat Advisory, Red Hat Bugzilla).

Technical details

The root cause is a CWE-415 (Double Free) condition in the dnn_execute_model_tf() function. When certain error conditions occur during model execution, a task object is freed via av_freep() in the error-handling path; however, the same task is subsequently released again by dnn_free_model_tf() after a successful queue push, resulting in a double-free and subsequent memory corruption. Exploitation requires a local attacker to supply crafted input data to an application using FFmpeg's TensorFlow DNN backend, triggering the vulnerable code path. The attack vector is local, requires no privileges, but does require user interaction (e.g., opening a malicious media file) (Red Hat Bugzilla, Red Hat Advisory).

Impact

Successful exploitation causes FFmpeg or any application embedding it to crash, resulting in a denial-of-service condition. The vulnerability has no impact on confidentiality or integrity — only availability is affected. Under normal conditions, arbitrary code execution is not considered achievable, limiting the blast radius to application crashes when processing TensorFlow-based DNN models (Red Hat Bugzilla).

Exploitation steps

  1. Craft malicious input: Prepare a specially crafted media file or model input designed to trigger an error condition within the dnn_execute_model_tf() function in FFmpeg's TensorFlow DNN backend.
  2. Deliver the file: Convince a local user or automated pipeline to process the crafted file using an FFmpeg-based application with TensorFlow DNN support enabled (e.g., via a video processing workflow or ML inference pipeline).
  3. Trigger the double-free: When FFmpeg processes the file, the error-handling path in dnn_execute_model_tf() frees the task object via av_freep(), and the subsequent call to dnn_free_model_tf() frees it again, causing memory corruption.
  4. Achieve denial of service: The double-free results in a crash of the FFmpeg process or the embedding application, causing a denial-of-service condition (Red Hat Bugzilla).

Indicators of compromise

  • Logs: Application crash logs or core dumps from FFmpeg processes referencing dnn_backend_tf.c or dnn_execute_model_tf(); heap corruption error messages from memory allocators (e.g., glibc double free or corruption errors).
  • Process: Unexpected termination of FFmpeg or applications embedding it when processing media files with TensorFlow DNN model inference enabled.
  • File System: Presence of unexpected or externally supplied media files or DNN model files in directories processed by FFmpeg-based pipelines.

Mitigation and workarounds

Users should upgrade FFmpeg to version 8.1 or later, which resolves the double-free condition in the TensorFlow DNN backend. As a workaround, disabling or avoiding use of FFmpeg's TensorFlow DNN backend (dnn_backend_tf) when processing untrusted input can mitigate the risk. Red Hat has tracked this issue and patch details are available via the associated Bugzilla entry (Red Hat Bugzilla, Red Hat Advisory).

Community reactions

The vulnerability was flagged by the Yocto Project security mailing list across multiple messages, indicating awareness in the embedded Linux community (Yocto Security List). Tenable published a Nessus plugin (ID 271857) for detection. No significant public researcher commentary or social media discussion has been identified beyond standard vulnerability aggregator coverage.

Additional resources


SourceThis report was generated using AI

Related Ffmpeg vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-66040HIGH8.7
  • Ffmpeg logoFfmpeg
  • cpe:2.3:a:ffmpeg:ffmpeg
NoNoJul 24, 2026
CVE-2026-66039HIGH8.7
  • Ffmpeg logoFfmpeg
  • cpe:2.3:a:ffmpeg:ffmpeg
NoNoJul 24, 2026
CVE-2026-66041HIGH7.7
  • Ffmpeg logoFfmpeg
  • cpe:2.3:a:ffmpeg:ffmpeg
NoNoJul 24, 2026
CVE-2026-66038HIGH7.1
  • Ffmpeg logoFfmpeg
  • ffmpeg
NoNoJul 24, 2026
CVE-2026-66037HIGH7.1
  • Ffmpeg logoFfmpeg
  • ffmpeg
NoNoJul 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management