CVE-2023-40476
HIGHCVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Lifecycle Timeline
3Tags
Description
GStreamer H265 Parsing Stack-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of GStreamer. Interaction with this library is required to exploit this vulnerability but attack vectors may vary depending on the implementation. The specific flaw exists within the parsing of H265 encoded video files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. . Was ZDI-CAN-21768.
Analysis
A stack-based buffer overflow vulnerability in GStreamer's H265 video parsing functionality allows remote attackers to execute arbitrary code when processing maliciously crafted H265 encoded video files. The vulnerability affects all GStreamer installations and requires user interaction (such as opening a malicious video file) but can lead to full system compromise in the context of the running application. With an EPSS score of 6.22% (91st percentile), this vulnerability has a higher-than-average likelihood of exploitation in the wild, and patches are available from the vendor.
Technical Context
GStreamer is a widely-used open-source multimedia framework that provides libraries and tools for constructing graphs of media-handling components, commonly used in Linux distributions and various media applications. The vulnerability, classified as CWE-121 (Stack-based Buffer Overflow), occurs specifically in the H265 (HEVC) video codec parsing logic where the library fails to properly validate the length of user-supplied data before copying it to a fixed-size buffer on the stack. Based on the CPE identifier (cpe:2.3:a:gstreamer:gstreamer:*:*:*:*:*:*:*:*), all versions of GStreamer prior to the patched release are affected, making this a widespread issue across numerous multimedia applications that depend on this library.
Affected Products
All versions of GStreamer prior to the patched release are vulnerable to this stack-based buffer overflow in the H265 parsing functionality, as indicated by the CPE identifier cpe:2.3:a:gstreamer:gstreamer:*:*:*:*:*:*:*:*. The vulnerability was originally tracked as ZDI-CAN-21768 by Trend Micro's Zero Day Initiative before public disclosure. Debian has issued security updates for their Long Term Support distributions as noted in their advisory at https://lists.debian.org/debian-lts-announce/2023/10/msg00038.html, and the vendor has published comprehensive security information at https://gstreamer.freedesktop.org/security/sa-2023-0008.html.
Remediation
Apply the vendor-provided patches immediately by updating GStreamer to the fixed version as detailed in the official security advisory at https://gstreamer.freedesktop.org/security/sa-2023-0008.html. For Debian-based systems, apply the updates mentioned in the Debian security announcement at https://lists.debian.org/debian-lts-announce/2023/10/msg00038.html. Until patching is complete, consider disabling H265/HEVC video processing if feasible, implement strict input validation for video files from untrusted sources, and run media processing applications with minimal privileges using sandboxing technologies where possible.
Priority Score
Share
External POC / Exploit Code
Leaving vuln.today