CVE-2026-135722: FFmpeg before 9.1 Heap Buffer Overflow via WAV Muxer Peak Envelope Writer
FFmpeg before 9.1 contains a heap-based buffer overflow vulnerability in peakinitwriter() and wavwritepacket() in libavformat/wavenc.c that allows attackers to corrupt heap memory by supplying audio with zero channels. Attackers can provide a crafted PCM stream declaring no channels for WAV output with peak envelope enabled, causing out-of-bounds writes past peakmaxpos and peakmaxneg arrays, crashes, and potential code execution.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
FFmpegto a version that resolves this vulnerability.Fixed in 9.1
Event History
Frequently Asked Questions
What conditions are required to trigger the vulnerability?
An attacker needs to supply a crafted PCM stream that declares zero audio channels. The stream must be processed for WAV output with peak envelope writing enabled.
Who can exploit this issue?
The provided vector indicates local access, low attack complexity, no privileges required, and user interaction required. Exploitation depends on a user or local workflow processing the attacker-controlled audio input.
How can I determine whether my environment is affected?
Systems using FFmpeg versions earlier than 9.1 are affected if they produce WAV output with peak envelope support enabled and may process PCM input declaring zero channels. The vulnerable code is identified in libavformat/wavenc.c, specifically peak_init_writer() and wav_write_packet().
What is the impact of successful exploitation?
The crafted input can cause out-of-bounds writes beyond the peak_maxpos and peak_maxneg heap arrays. This can corrupt heap memory, cause a crash, and may enable code execution.