# CVE-2026-30754: FFmpeg memory corruption in RTP H.264/HEVC encoding

Source: https://junglewise.ai/threats/cve-2026-30754-ffmpeg-memory-corruption-in-rtp-h-264-hevc-encoding  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-08. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-30754 · Severity: high · CVSS 8.8 · Published 2026-09-08

FFmpeg is a widely-used multimedia framework that processes audio and video streams. A memory corruption bug in the RTP encoding function for H.264/HEVC video streams allows an attacker to trigger a buffer overflow by providing a crafted media file, potentially leading to code execution on systems processing untrusted video content.

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

## Quick answers

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

**How severe is CVE-2026-30754?** High severity, with a CVSS score of 8.8, published 8 September 2026.

**Which products and versions are affected?** Ffmpeg before 8.1.

**Is there a fix for CVE-2026-30754?** A patch was published on 2025-10-30: Fix merged into master Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-30754 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-30754?** 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

The vulnerability is a buffer overflow in the nal_send function of libavformat/rtpenc_h264_hevc.c, where a negative size parameter (size=-3) is incorrectly passed to memcpy during RTP transmission of H.264/HEVC streams. The root cause is insufficient validation of size parameters before memory operations. An attacker can exploit this by crafting a malicious input file processed with FFmpeg's RTP output mode (e.g., "ffmpeg -c copy -f rtp rtp://127.0.0.1:1234 -i input"). The vulnerability requires local access to trigger and was detected using AddressSanitizer. A fix was merged upstream in PR #20746, adding proper space checks for nal_length_size in the ff_rtp_send_h264_hevc function.

## Affected products

- FFmpeg FFmpeg before 8.1

## Timeline

- 2026-09-08: disclosed
- 2025-10-24: other: Fix PR #20746 opened
- 2025-10-30: patched: Fix merged into master

## References

- [https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20746](https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20746)
- [https://gist.github.com/momo-trip/4cddf2c9e15600873de55259dac6b0e6](https://gist.github.com/momo-trip/4cddf2c9e15600873de55259dac6b0e6)

## 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)
