Junglewise Threat Intelligence

CVE-2026-54241: libde265 heap buffer overflow in sample adaptive offset filter

CVE-2026-54241 · Severity: high · CVSS 7.4 · Published 2026-09-11

Executive brief

libde265 is a widely-used open-source H.265 video codec library used by popular media applications including VLC, GStreamer, and GNOME image viewers. A flaw in its sample adaptive offset filter allows a specially crafted video file to trigger an integer overflow, resulting in undersized memory allocation and out-of-bounds reading from the heap—potentially exposing sensitive data in decoded video output or crashing the application.

Technical details

The vulnerability exists in the apply_sample_adaptive_offset_sequential() function in libde265/sao.cc, where a signed 32-bit integer overflow occurs when calculating the SAO input buffer size (stride × height × bytes_per_pixel). With large HEVC dimensions (e.g., 46341×46341 pixels at 16-bit color depth), this calculation wraps to a small positive value, causing undersized heap allocation. The SAO filter then performs reads using the actual (non-overflowed) stride value, reading up to ~4.3 GB past a ~625 KB buffer. Attack requires a crafted HEVC bitstream with specific SPS parameters, no user interaction or authentication. The fix widens the calculation to 64-bit (size_t). Patched in version 1.1.1.

Affected products

  • strukturag libde265 prior to 1.1.1

Timeline

  • 2026-06-03: disclosed: GitHub Security Advisory GHSA-j2qq-x2xq-g9wr published
  • 2026-09-11: advisory: CVE-2026-54241 published on NVD
  • 2026-06-03: patched: Version 1.1.1 contains patch

References