FFmpeg RASC Decoder Flaw Enables Heap Out-of-Bounds Write via Crafted Media
Patch & Detection Intelligence · 4 sources · Updated 5mo ago · First seen Jun 28, 2026

A high-severity vulnerability tracked as CVE-2026-58049 affects FFmpeg’s RASC video decoder in libavcodec/rasc.c, where the decode_dlta() function performs 32-bit reads and writes before enforcing a row-boundary check. The flaw is compounded by validating the DLTA region in pixel units rather than byte units, allowing a crafted media stream using the RASC FourCC to access several bytes past a PAL8 frame row allocation. Security advisories say the bug can trigger a bitstream-controlled heap out-of-bounds write and an adjacent out-of-bounds read during decoding, leading to memory corruption and potential remote exploitation.
A public proof of concept demonstrates the issue on FFmpeg upstream code and shows how DLTA run handlers can write past a 64-byte PAL8 frame row boundary. The PoC uses a custom buffer callback to place a function pointer next to the frame buffer, then overwrites the low bytes of that pointer through a crafted DLTA run to redirect execution, while AddressSanitizer reports a heap-buffer-overflow in decode_dlta(). Reported mitigations include updating FFmpeg, applying vendor patches, and moving row-boundary validation ahead of every 32-bit access with stricter checks such as ensuring cx + 4 <= w * s->bpp.
Why it matters
Impact assessment
CVE-2026-58049 is a high-severity memory corruption flaw in FFmpeg's libavcodec RASC decoder that affects any product, service, or workflow that decodes untrusted RASC media through FFmpeg. Media processing pipelines, desktop applications, browsers or collaboration tools embedding FFmpeg, content moderation systems, and backend transcoding services are the most exposed populations.
The impact is potentially severe because a crafted media file can trigger a bitstream-controlled heap out-of-bounds write and adjacent out-of-bounds read during decoding, creating a path to process crash, service disruption, and possible remote code execution. Exposure is likely broad wherever FFmpeg is deployed, but exploitation requires delivery of a crafted RASC stream; the references provide a public proof of concept but do not cite confirmed in-the-wild exploitation.
Supporting details
- Affected product: FFmpeg
- Affected component: libavcodec RASC decoder
- Vulnerable function:
decode_dlta()inlibavcodec/rasc.c - Trigger condition: decoding a crafted media stream using the RASC FourCC
- Impact types: heap out-of-bounds write, adjacent out-of-bounds read, memory corruption
- Potential outcomes: application crash, decoder compromise, downstream service interruption, possible code execution
- Scope: potentially widespread across environments that ingest untrusted media with FFmpeg
- Exploitation status: public proof of concept available; no confirmed in-the-wild exploitation stated in the references

