CVE-2026-135706: FFmpeg before 9.1 Heap Buffer Overflow via libmodplug Demuxer
FFmpeg before 9.1 contains a heap buffer overflow vulnerability in modplugreadheader() in libavformat/libmodplug.c that allocates the buffer using maxsize instead of sz. When maxsize is set to 0, attackers can supply crafted module files that avioread() copies into a zero-sized buffer, causing memory corruption, crashes, or possible code execution.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Systems using FFmpeg versions before 9.1 are affected when they process attacker-controlled module files through the libmodplug demuxer. Exploitation requires local attack vector conditions and user interaction, according to the supplied CVSS vector.
What does an attacker need to do to trigger the overflow?
An attacker must provide a crafted module file that reaches modplug_read_header() with max_size set to 0. The vulnerable code then allows avio_read() to copy data into a zero-sized allocated buffer.
What is the impact if exploitation succeeds?
The heap buffer overflow can cause memory corruption and crashes, and may allow code execution. The supplied severity vector rates confidentiality, integrity, and availability impact as high.
What should be done if the affected component cannot be updated immediately?
Avoid processing untrusted module files with the libmodplug demuxer until FFmpeg can be updated to version 9.1 or later. This reduces the opportunity for a crafted input file to reach the vulnerable code path.