CVE-2026-65706
High · 7.8CVSS
7.8
EPSS
0.2%
Published
Jul 23, 2026
CISA due date
—
Cloudanix analysis
A bug in a popular video processing tool can let specially made video files crash programs or potentially take them over when certain editing features are used.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds write in the vf_swaprect filter's filter_frame() function that reuses a row buffer sized for single-byte plane 0 across multi-byte chroma planes, allowing an 18-byte memcpy into a 17-byte heap allocation when processing odd-width NV12 frames.
Why it matters to the business
Applications that process user-supplied video through FFmpeg's swaprect filter can crash or allow arbitrary code execution, potentially disrupting media workflows, video transcoding pipelines, or playback services with low observed exploitation likelihood.
How an attack unfolds
An attacker crafts an NV12 video frame with odd width dimensions and supplies it to any FFmpeg-based application or library that invokes the swaprect filter, triggering the oversized memcpy during frame processing and resulting in heap corruption that may be leveraged for code execution.
How to fix it
Upgrade FFmpeg to a version newer than 8.1.2 once a fix is released; until then disable or avoid use of the swaprect video filter in all processing pipelines.
How to confirm the fix worked
Confirm the installed FFmpeg version is newer than 8.1.2 and test that the swaprect filter is either removed or rejects odd-width NV12 input without crashing.
Typical attack path
- Craft malicious NV12 video file with odd-width dimensions targeting the swaprect filter
- Deliver the file to a target application or service that uses FFmpeg with the vulnerable filter enabled
- Trigger filter_frame() processing on the crafted frame
- Exploit resulting heap corruption to achieve code execution or cause denial of service
How to detect it
Review application and system logs for FFmpeg process crashes or segmentation faults occurring while processing video files; look for repeated invocations of the swaprect filter on untrusted input.
What your security team should do
- Inventory all systems and containers using FFmpeg and identify those invoking the swaprect filter
- Apply the newest available FFmpeg build as soon as released and verify filter behavior
- Add runtime restrictions or sandboxing around FFmpeg processes handling untrusted video
- Monitor EPSS and KEV status for changes given the 94-day publication window and current low exploit maturity
The record
FFmpeg versions 3.0 through 8.1.2 contain an out-of-bounds write vulnerability in the vf_swaprect video filter that allows attackers to corrupt heap memory by supplying a crafted NV12 video frame with odd width dimensions. The filter_frame() function reuses a temporary row buffer sized for plane 0's single-byte pixel step across all planes, causing an 18-byte memcpy into a 17-byte heap allocation when processing the two-byte-per-sample interleaved chroma plane of a 17x16 NV12 frame, resulting in heap corruption and process crash with potential for code execution.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-57192 Asterisk is an open source private branch exchange and telephony toolkit. CWE-131
- CVE-2026-112710 A heap-based buffer overflow vulnerability exists in the Fireware OS authentication… CWE-131
- CVE-2026-112709 A heap-based buffer overflow vulnerability in the Fireware OS authentication service… CWE-131
- CVE-2026-107590 An out-of-bounds write vulnerability in the Qt QTextCodec iconv-based encoding of the Qt… CWE-131
- CVE-2026-116737 libphdi through 20260902 contains a heap out-of-bounds read vulnerability in… CWE-131
- CVE-2026-82944 SOEM version 2.0.0 and earlier contains a vulnerability in multi-segment data transfers… CWE-131
- CVE-2026-97631 EDK2 contains a vulnerability in BIOS where a user may cause “Out-of-bounds Write”… CWE-131
- CVE-2020-37287 Vyper before 0.2.6 contains a call stack corruption vulnerability that causes incorrect… CWE-131