CVE-2026-65704
High · 7.8CVSS
7.8
EPSS
0.2%
Published
Jul 23, 2026
CISA due date
—
Cloudanix analysis
A flaw in a popular media tool can let a specially made file damage memory and potentially take over a computer when someone processes it.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds write via heap corruption: TY demuxer decrements packet size without bounds checks, yielding a negative value passed to memcpy in shorten_decode_frame after size_t conversion, allowing reads/writes far beyond allocated buffers when a crafted ffconcat file is processed with -safe 0.
Why it matters to the business
Attackers can corrupt process memory when users or automated pipelines open malicious concatenation files, potentially leading to crashes, arbitrary code execution, or data exposure on systems running vulnerable FFmpeg builds; low public exploit activity reduces immediate ransomware risk but still requires prompt patching once fixes ship.
How an attack unfolds
An attacker crafts an ffconcat file that triggers the TY demuxer path, supplies it to FFmpeg with the -safe 0 flag, and causes the size miscalculation that overflows the Shorten decoder buffer; no named threat actors are associated yet and EPSS remains low with flat trend.
How to fix it
Upgrade to the first patched FFmpeg release once available; in the interim disable -safe 0 usage for untrusted inputs, sandbox FFmpeg processes, and avoid processing untrusted concatenation or TY files.
How to confirm the fix worked
Rebuild or reinstall from a known-clean patched source, verify the vulnerable demux_audio and shorten_decode_frame paths are updated via code review or binary diffing, and test that crafted ffconcat inputs no longer trigger negative-size memcpy conditions.
Typical attack path
- Craft malicious ffconcat referencing TY content that forces negative packet size in demux_audio
- Invoke FFmpeg (or dependent tool) with -safe 0 flag on the file
- Trigger shorten_decode_frame memcpy with wrapped size_t value
- Achieve out-of-bounds read/write leading to heap corruption and potential code execution
How to detect it
Review FFmpeg invocation logs for -safe 0 usage combined with ffconcat or TY inputs; inspect process crashes or memory-corruption events near shorten_decode_frame or demux_audio; correlate with file-creation timestamps of suspicious concatenation files.
What your security team should do
- Inventory all FFmpeg deployments and dependent applications immediately
- Block or filter untrusted ffconcat and TY inputs at ingestion points
- Monitor for upstream patch release and schedule upgrade within 30 days of availability
- Apply runtime sandboxing or containerization around media-processing workloads
The record
FFmpeg through 8.1.2 contains an out-of-bounds write vulnerability that allows attackers to cause heap corruption by supplying a crafted ffconcat file processed with the -safe 0 flag. The TY demuxer's demux_audio() function decrements packet size without bounds checking, producing a negative size value that is passed to memcpy() in shorten_decode_frame(), where conversion to size_t wraps the value to near SIZE_MAX and triggers reads beyond the source allocation and writes far beyond the Shorten decoder's bitstream buffer.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-121727 Kore before 4.3.0 contains an integer underflow vulnerability in HTTP request body… CWE-191
- CVE-2026-61497 TinyUSB before 0.20.1 contains an integer underflow vulnerability in the HID host report… CWE-191
- CVE-2026-120060 psqlODBC trusts counts and lengths in server data in three places. CWE-191
- CVE-2026-120058 psqlODBC sizes its row cache from the column count of a cursor's first result, but… CWE-191
- CVE-2026-20576 In afe, there is a possible out of bounds write due to a missing bounds check. CWE-191
- CVE-2026-20572 In adsp, there is a possible out of bounds write due to an integer overflow. CWE-191
- CVE-2026-111735 P-Net before 1.0.3 contains an integer underflow in pf_cpm_c_data_ind(). CWE-191
- CVE-2026-103411 An Integer Underflow vulnerability in DhcpMessageDecoder in Juniper Networks Session… CWE-191