CVE-2026-65704

FFmpeg 8.1.2 Out-of-Bounds Write via TY Demuxer and Shorten Decoder

Published Jul 23, 2026 CVSS 4.0 · 7.3 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

FFmpeg versions up to 8.1.2 allow an out-of-bounds write that can corrupt heap memory. The vulnerability is triggered when the TY demuxer’s demux_audio() function decreases a packet size without bounds checking, producing a negative value. That negative value is later passed to memcpy() in shorten_decode_frame(); the conversion to size_t wraps the value to a value near SIZE_MAX, leading to reads beyond the source allocation and writes far beyond the Shorten decoder’s bitstream buffer. The result is heap corruption, which may enable further exploitation depending on the surrounding memory state.

Affected Systems

The vulnerability applies to all FFmpeg releases at or below version 8.1.2, across any operating system that includes the affected library. Any application or service that incorporates FFmpeg 8.1.2 or earlier for media processing is potentially impacted. The vendor, FFmpeg, lists the affected product as FFmpeg; the CPE string confirms the reach across all FFmpeg installations.

Risk and Exploitability

The CVSS score of 7.3 indicates high severity, yet the EPSS score is below one percent and the vulnerability is not in the CISA KEV catalog, suggesting a low probability of exploitation at present. The attack requires an attacker to supply a crafted ffconcat file processed with the –safe 0 flag to a running FFmpeg instance; no explicit privilege escalation or remote code execution is described in the CVE text. Based on the description, it is inferred that an attacker would need to get the application to process a malicious ffconcat file, which may be feasible if the service accepts user‑supplied media sources.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade FFmpeg to 8.1.3 or later to eliminate the out‑of‑bounds write.
  • If an upgrade cannot be performed immediately, avoid using the –safe 0 option when feeding ffconcat files into FFmpeg, as the crafted input would not reach the vulnerable code.
  • Identify all services or applications that use ffconcat files with FFmpeg and isolate or harden them to limit potential exploitation until a patch can be applied.

Generated by OpenCVE AI on August 4, 2026 at 15:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8716-2 FFmpeg vulnerabilities
History
Type Values Removed Values Added
CPEs cpe:2.3:a:ffmpeg:ffmpeg:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Ffmpeg
Ffmpeg ffmpeg
Vendors & Products Ffmpeg
Ffmpeg ffmpeg
Type Values Removed Values Added
Description 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.
Title FFmpeg 8.1.2 Out-of-Bounds Write via TY Demuxer and Shorten Decoder
Weaknesses CWE-191
CWE-787
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 7.3, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses
  • CWE-191

    Integer Underflow (Wrap or Wraparound)

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 28, 2026, 1:06 AM
Reserved
Jul 22, 2026, 8:26 PM
Status
Analyzed
Published
Jul 23, 2026, 8:17 PM
Modified
Aug 7, 2026, 12:16 AM
Severity
Moderate
Public date
Jul 23, 2026, 6:55 PM