CVE-2026-66039
High · 8.8CVSS
8.8
EPSS
0.3%
Published
Jul 24, 2026
CISA due date
—
Cloudanix analysis
A flaw in media software could let attackers take over a computer by tricking it into opening a specially made audio file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Signed integer overflow in mace_decode_frame() during output sample count computation for MACE6 decoder, triggered by oversized bytes_per_packet and frames_per_packet in CAF desc chunk, causing undersized heap buffer allocation followed by out-of-bounds write.
Why it matters to the business
Processing of untrusted media files can lead to arbitrary code execution on systems running media pipelines, increasing risk of compromise in content ingestion, transcoding, or playback workflows.
How an attack unfolds
An attacker crafts a CAF file containing a malicious desc chunk with oversized bytes_per_packet and frames_per_packet values, then supplies the file to an FFmpeg instance; the MACE6 decoder path computes an incorrect sample count due to integer overflow, allocates an undersized buffer, and performs a heap out-of-bounds write that can be leveraged for code execution.
How to fix it
Upgrade FFmpeg to a build containing commit aafb5c6 or later; disable MACE6 decoder support or reject CAF files until patched; apply input sanitization on bytes_per_packet and frames_per_packet values where possible.
How to confirm the fix worked
Verify FFmpeg binary or source contains commit aafb5c6; recompile and test decoding of known-good versus boundary CAF files; monitor for allocation-size assertions or crashes in mace_decode_frame during fuzzing.
Typical attack path
- Craft CAF file with malicious desc chunk values targeting MACE6 decoder
- Deliver crafted file via network, upload, or storage media
- Victim FFmpeg instance opens and decodes the file using MACE6 path
- Trigger signed integer overflow and undersized allocation
- Perform heap out-of-bounds write to achieve code execution
How to detect it
Search application and system logs for FFmpeg invocations involving CAF files that reference mace_decode_frame; monitor for segmentation faults, heap corruption signals, or unusual memory allocation sizes during audio decoding; inspect process crashes containing references to bytes_per_packet or frames_per_packet calculations.
- mace_decode_frame
- bytes_per_packet
- frames_per_packet
- CAF desc chunk
What your security team should do
- Prioritize upgrade of all FFmpeg instances to post-aafb5c6 builds
- Add CAF file validation or sandboxing for media processing services
- Review and restrict decoder support for legacy formats like MACE6
- Enable memory safety tooling (ASAN, fuzzing) on media pipelines
The record
FFmpeg through 8.1.2, fixed in commit aafb5c6, contains a signed integer overflow vulnerability in the MACE6 audio decoder that allows attackers to corrupt heap memory by supplying a crafted CAF file with a malicious bytes_per_packet value. Attackers can craft a CAF file with oversized bytes_per_packet and frames_per_packet values in the desc chunk to trigger an integer overflow in mace_decode_frame() during output sample count computation, resulting in an undersized buffer allocation and heap out-of-bounds write that could enable code execution.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-120775 Tanium addressed a heap-based buffer overflow vulnerability in Deploy. CWE-122
- CVE-2026-121517 A vulnerability was detected in IrfanView 4.76.0.0 on Win64. CWE-122
- CVE-2026-121247 Buffer overflow in Dawn in Google Chrome on on Android prior to 157.0.8103.38 allowed a… CWE-122
- CVE-2026-121180 Buffer overflow in Media in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-122
- CVE-2026-121156 Buffer overflow in Dawn in Google Chrome prior to 157.0.8103.38 allowed a remote attacker… CWE-122
- CVE-2026-121113 Buffer overflow in PDFium in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-122
- CVE-2026-121086 Buffer overflow in Skia in Google Chrome prior to 157.0.8103.38 allowed a remote attacker… CWE-122
- CVE-2026-121047 Buffer overflow in Media in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-122