Junglewise Threat Intelligence

CVE-2026-38345: FFmpeg division-by-zero in libswscale scaling context initialization

CVE-2026-38345 · Severity: medium · CVSS 6.5 · Published 2026-08-28

Technologies: Ffmpeg. Vendors: Ffmpeg.

Executive brief

FFmpeg is a multimedia framework used to encode, decode, and transcode video and audio files. A division-by-zero vulnerability in its video scaling library allows attackers to crash applications using FFmpeg by providing specially crafted input, causing service disruption and potential exploitation as a denial-of-service vector.

Technical details

A division-by-zero vulnerability exists in the ff_sws_init_single_context function within libswscale/utils.c at line 1412 during scaling context initialization. When converting YUV411p format video to very narrow output widths (≤8 pixels), the chroma destination width calculation results in a value ≤2, causing a division by zero when the code attempts to divide by (chrDstW-2). The vulnerability is triggered when processing crafted video input through FFmpeg's scale filter with specific dimension parameters. An attacker can achieve denial of service by causing a floating-point exception (SIGFPE) that terminates the process. The vulnerability affects FFmpeg version N-122528-gdd2976b9e1 and likely other versions; patch status is currently unknown.

Affected products

  • FFmpeg FFmpeg N-122528-gdd2976b9e1 and likely others

Timeline

  • 2026-01-26: disclosed: Bug report filed on FFmpeg Forgejo
  • 2026-08-28: advisory: CVE-2026-38345 published on NVD

References

Related threats