CVE-2026-135725: FFmpeg before 9.1 Stack-Based Buffer Overflow via ff_rtmp_packet_write()
FFmpeg before 9.1 contains a stack-based buffer overflow vulnerability in ffrtmppacketwrite() in libavformat/rtmppkt.c that allows malicious RTMP servers to overflow a 16-byte header buffer. Attackers can send a Set Chunk Size packet on a high channel id with an extended timestamp, which handlechunksize() echoes back, corrupting the publishing client's stack.
Affected Software
Event History
Frequently Asked Questions
Which FFmpeg deployments are exposed?
The affected scenario is an FFmpeg-based publishing client that connects to an RTMP server. A malicious RTMP server can target the client during that publishing connection.
What must an attacker control to exploit this issue?
The attacker must be able to act as, or control, the RTMP server used by the publishing client. The server sends a Set Chunk Size packet using a high channel ID and an extended timestamp, causing the client to echo data into the undersized header buffer.
What should be done if patching cannot happen immediately?
Do not use affected FFmpeg versions to publish to untrusted RTMP endpoints. Restrict publishing connections to RTMP servers under your control until FFmpeg can be updated.
How can I determine whether a client needs remediation?
Check whether the client uses FFmpeg before version 9.1 and publishes to an RTMP server. Such a client should be treated as affected when the RTMP server could be malicious or compromised.
Which version resolves the issue?
Upgrade FFmpeg to version 9.1 or later. Versions before 9.1 are affected.