CVE-2026-66038
Ffmpeg vulnerability analysis and mitigation

Overview

CVE-2026-66038 is an information disclosure vulnerability in FFmpeg's LCL/ZLIB video decoder that exposes uninitialized heap memory to attackers via a crafted video file. It affects FFmpeg through version 8.1.2 and was disclosed on July 24, 2026, with a fix available in commit 8670835. The vulnerability carries a CVSS v3.1 score of 6.5 (Medium) and a CVSS v4.0 score of 7.1 (High) (GitHub Advisory, VulnCheck).

Technical details

The root cause is classified as CWE-908 (Use of Uninitialized Resource), located in the zlib_decomp() function within lcldec.c. When a valid zlib stream decompresses to fewer bytes than the expected frame size, the function treats this short decompression as non-fatal and proceeds to the RGB24 conversion path, which copies a full frame's worth of rows from the allocation buffer using the original frame dimensions. This causes uninitialized heap contents — including pointer-derived allocator bytes — to be copied into the attacker-observable AVFrame output, potentially defeating ASLR in long-lived media processing services. Exploitation requires user interaction (passive), as a victim must open or process a maliciously crafted LCL/ZLIB video file (GitHub Advisory, VulnCheck).

Impact

Successful exploitation results in a high confidentiality impact with no integrity or availability impact. An unauthenticated attacker can cause uninitialized heap memory — including sensitive pointer-derived allocator bytes — to be embedded in the decoded video output (AVFrame), which may be observable by the attacker. In long-lived media processing services (e.g., transcoding pipelines, streaming servers), this leak can be leveraged to defeat ASLR, potentially enabling follow-on memory corruption attacks (GitHub Advisory, VulnCheck).

Exploitation steps

  1. Craft malicious video file: Create a video file using the LCL/ZLIB codec containing a valid zlib stream that, when decompressed, produces fewer bytes than the expected frame size (i.e., width × height × bytes-per-pixel for the target resolution).
  2. Deliver the file to the target: Distribute the crafted video file to a victim via email attachment, web download, or by hosting it on a media server that the target application processes automatically (e.g., a transcoding pipeline).
  3. Trigger decoding: Induce the victim or target service to open/process the file with a vulnerable FFmpeg version (≤ 8.1.2), causing zlib_decomp() in lcldec.c to handle the short decompression without error.
  4. Observe AVFrame output: The RGB24 conversion path copies a full frame's worth of rows from the uninitialized allocation buffer into the AVFrame output. The attacker retrieves the decoded frame data (e.g., via a media service API response, file output, or network stream) and inspects it for heap pointer artifacts.
  5. Extract ASLR-defeating information: Parse the leaked heap bytes from the frame output to identify pointer-derived allocator values, which can be used to calculate the base address of heap allocations and defeat ASLR for subsequent exploitation stages (GitHub Advisory, VulnCheck).

Indicators of compromise

  • File System: Presence of unusual .avi, .mov, or other video container files using the LCL/ZLIB codec with anomalously small compressed data relative to declared frame dimensions; files submitted to media processing directories that produce unexpected decoded output sizes.
  • Logs: FFmpeg process logs showing LCL/ZLIB decoder activity (lcldec.c) without decompression error termination when processing externally supplied video files; absence of expected error messages for short zlib decompression results.
  • Process: FFmpeg or media processing service processes consuming video files from untrusted sources and producing decoded frame output that contains non-video byte patterns (e.g., pointer-like values in pixel data regions).
  • Network: Unusual inbound video files (LCL/ZLIB codec) submitted to media transcoding APIs or streaming endpoints, particularly from external or unauthenticated sources.

Mitigation and workarounds

Update FFmpeg to a version containing commit 86708357d126af84c16f80d9c57335d1e8c845c5 (commit 8670835) or later, which fixes the short-decompression handling in zlib_decomp(). As a workaround, implement input validation to reject LCL/ZLIB streams that decompress to fewer bytes than the expected frame size before passing them to the decoder. Additionally, run media processing services with reduced privileges and ensure OS-level ASLR is enabled to limit the impact of any memory disclosure. Avoid processing untrusted LCL/ZLIB video files until the patch is applied (GitHub Advisory, VulnCheck).

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
  • cpe:2.3:a:ffmpeg: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