# CVE-2026-66039: FFmpeg signed integer overflow in MACE6 audio decoder

Source: https://junglewise.ai/threats/cve-2026-66039-ffmpeg-signed-integer-overflow-in-mace6-audio-decoder  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-24. Updated: 2026-07-24  
License: CC BY 4.0 with a link back

CVE-2026-66039 · Severity: high · CVSS 8.8 · Published 2026-07-24

FFmpeg, a widely used multimedia framework for processing audio and video, contains a vulnerability in its MACE6 audio decoder. By tricking a user into opening a specially crafted CAF audio file, an attacker could cause the application to crash or potentially execute malicious code. This could lead to a full system compromise or unauthorized access to sensitive user data.

Technologies: [Ffmpeg](https://junglewise.ai/threats/technologies/ffmpeg). Vendors: [Ffmpeg](https://junglewise.ai/threats/vendors/ffmpeg).

## Quick answers

**Is CVE-2026-66039 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-66039 being exploited in the wild.

**How severe is CVE-2026-66039?** High severity, with a CVSS score of 8.8, published 24 July 2026.

**Which products and versions are affected?** Ffmpeg through 8.1.2.

**Is there a fix for CVE-2026-66039?** A patch was published on 2026-06-29: Fix committed to FFmpeg master branch Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-66039 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-66039?** Check whether you run Ffmpeg at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A signed integer overflow vulnerability exists in the mace_decode_frame() function of the MACE6 audio decoder in FFmpeg through version 8.1.2. The flaw is triggered when processing a Core Audio Format (CAF) file containing oversized bytes_per_packet and frames_per_packet values in the 'desc' chunk. This leads to an integer overflow during the computation of the output sample count, resulting in an undersized heap buffer allocation. Subsequent decoding operations then perform an out-of-bounds write to the heap. An attacker can exploit this by providing a malicious CAF file, requiring minimal user interaction (opening the file), to achieve arbitrary code execution. The issue was fixed in commit aafb5c6.

## Affected products

- FFmpeg FFmpeg through 8.1.2

## Timeline

- 2026-06-29: patched: Fix committed to FFmpeg master branch
- 2026-07-24: disclosed: CVE-2026-66039 published

## References

- [https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/aafb5c655edc76a753275c383ebb139feb032718](https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/aafb5c655edc76a753275c383ebb139feb032718)
- [https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23631](https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23631)
- [https://www.vulncheck.com/advisories/ffmpeg-mace6-audio-decoder-heap-out-of-bounds-write-via-caf-file](https://www.vulncheck.com/advisories/ffmpeg-mace6-audio-decoder-heap-out-of-bounds-write-via-caf-file)

## Related threats

- [FFmpeg heap out-of-bounds read in v4l2_buffers](https://junglewise.ai/threats/cve-2026-125270-ffmpeg-through-9-0-2-contains-a-heap-out-of-bounds-read)
- [FFmpeg double free in H.264 SEI message handling](https://junglewise.ai/threats/cve-2026-125269-ffmpeg-through-9-0-2-contains-a-double-free-vulnerability-in)
- [FFmpeg heap out-of-bounds write in APAC decoder](https://junglewise.ai/threats/cve-2026-125267-ffmpeg-before-8-1-3-and-9-x-before-9-0-2-contains-a-heap-out-of)
- [FFmpeg use-after-free in NVIDIA codec decoding](https://junglewise.ai/threats/cve-2026-125265-ffmpeg-through-9-0-2-contains-a-use-after-free-vulnerability-in)
- [FFmpeg JPEG XL parser uncontrolled resource consumption](https://junglewise.ai/threats/cve-2026-125264-ffmpeg-through-9-0-2-contains-an-uncontrolled-resource)
