CVE-2023-40476
High · 8.8CVSS
8.8
EPSS
2.3%
Published
May 3, 2024
CISA due date
—
Cloudanix analysis
A flaw in a widely used video library lets attackers take over computers simply by getting them to open a specially made video file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Stack-based buffer overflow in H265 parsing due to missing length validation before copying attacker-controlled data into a fixed-size stack buffer, enabling arbitrary code execution in the context of the GStreamer process.
Why it matters to the business
Attackers can gain full control over systems that process untrusted H265 video files, potentially leading to data theft, ransomware deployment, or use as an entry point into broader networks; media and content-processing pipelines are most exposed.
How an attack unfolds
An attacker crafts a malicious H265-encoded video file containing oversized data in a field parsed by GStreamer. When a vulnerable application opens or decodes the file, the parser overflows the stack buffer, allowing the attacker to overwrite the return address and execute arbitrary code without authentication.
How to fix it
Upgrade GStreamer to the commit ddb4fbe43149b157efb52b6472313f48308c1dbc or later; rebuild any dependent applications against the patched library; disable H265 decoding where not required.
How to confirm the fix worked
Confirm the installed GStreamer sources or binary contain commit ddb4fbe43149b157efb52b6472313f48308c1dbc; recompile and test with known H265 samples; monitor for process crashes during media ingestion.
Typical attack path
- Identify target applications that use GStreamer to decode H265 video
- Craft or obtain a malicious H265 file that triggers the buffer overflow
- Deliver the file via web download, email attachment, or shared media
- Victim application parses the file and executes attacker-supplied code
- Attacker establishes persistence or pivots within the compromised environment
How to detect it
Review application and system logs for GStreamer processes handling H265 streams that terminate abnormally; inspect file-access logs for recent H265 files preceding suspicious process activity; correlate with endpoint telemetry showing unexpected code execution or shell activity after media parsing.
What your security team should do
- Apply the fixed commit immediately in all media-processing pipelines
- Inventory applications and containers that depend on GStreamer H265 support
- Implement content-type validation and sandboxing for untrusted video files
- Add GStreamer crash and memory-corruption alerts to SOC monitoring
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | gstreamer1-plugins-bad-free | 0 | 1.16.1-4.el8 |
| AlmaLinux:8 | gstreamer1-plugins-bad-free-devel | 0 | 1.16.1-4.el8 |
| AlmaLinux:9 | gstreamer1-plugins-bad-free | 0 | 1.22.1-4.el9 |
| AlmaLinux:9 | gstreamer1-plugins-bad-free-devel | 0 | 1.22.1-4.el9 |
| Debian:10 | gst-plugins-bad1.0 | 0 | 1.14.4-1+deb10u4 |
| Debian:11 | gst-plugins-bad1.0 | 0 | 1.18.4-3+deb11u2 |
| Debian:12 | gst-plugins-bad1.0 | 0 | 1.22.0-4+deb12u2 |
| Debian:13 | gst-plugins-bad1.0 | 0 | 1.22.7-1 |
| Debian:14 | gst-plugins-bad1.0 | 0 | 1.22.7-1 |
| Mageia:9 | gstreamer1.0 | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-devtools | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-editing-services | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-libav | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-moodbar | 0 | 1.2.1-5.mga9 |
| Mageia:9 | gstreamer1.0-omx | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-plugins-bad | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-plugins-bad | 0 | 1.22.8-1.mga9.tainted |
| Mageia:9 | gstreamer1.0-plugins-base | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-plugins-good | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-plugins-ugly | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-plugins-ugly | 0 | 1.22.8-1.mga9.tainted |
| Mageia:9 | gstreamer1.0-python | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-rtsp-server | 0 | 1.22.8-1.mga9 |
| Mageia:9 | gstreamer1.0-vaapi | 0 | 1.22.8-1.mga9 |
| Red Hat:enterprise_linux:8::appstream | gstreamer1-plugins-bad-free | 0 | 0:1.16.1-4.el8 |
| Red Hat:enterprise_linux:8::appstream | gstreamer1-plugins-bad-free-debuginfo | 0 | 0:1.16.1-4.el8 |
| Red Hat:enterprise_linux:8::appstream | gstreamer1-plugins-bad-free-debugsource | 0 | 0:1.16.1-4.el8 |
| Red Hat:enterprise_linux:8::appstream | gstreamer1-plugins-bad-free-devel | 0 | 0:1.16.1-4.el8 |
| Red Hat:enterprise_linux:8::crb | gstreamer1-plugins-bad-free | 0 | 0:1.16.1-4.el8 |
| Red Hat:enterprise_linux:8::crb | gstreamer1-plugins-bad-free-debuginfo | 0 | 0:1.16.1-4.el8 |
| Red Hat:enterprise_linux:8::crb | gstreamer1-plugins-bad-free-debugsource | 0 | 0:1.16.1-4.el8 |
| Red Hat:enterprise_linux:8::crb | gstreamer1-plugins-bad-free-devel | 0 | 0:1.16.1-4.el8 |
| Red Hat:enterprise_linux:9::appstream | gstreamer1-plugins-bad-free | 0 | 0:1.22.1-4.el9 |
| Red Hat:enterprise_linux:9::appstream | gstreamer1-plugins-bad-free-debuginfo | 0 | 0:1.22.1-4.el9 |
| Red Hat:enterprise_linux:9::appstream | gstreamer1-plugins-bad-free-debugsource | 0 | 0:1.22.1-4.el9 |
| Red Hat:enterprise_linux:9::appstream | gstreamer1-plugins-bad-free-devel | 0 | 0:1.22.1-4.el9 |
| Red Hat:enterprise_linux:9::crb | gstreamer1-plugins-bad-free | 0 | 0:1.22.1-4.el9 |
| Red Hat:enterprise_linux:9::crb | gstreamer1-plugins-bad-free-debuginfo | 0 | 0:1.22.1-4.el9 |
| Red Hat:enterprise_linux:9::crb | gstreamer1-plugins-bad-free-debugsource | 0 | 0:1.22.1-4.el9 |
| Red Hat:enterprise_linux:9::crb | gstreamer1-plugins-bad-free-devel | 0 | 0:1.22.1-4.el9 |
| Rocky Linux:8 | gstreamer1-plugins-bad-free | 0 | 0:1.16.1-4.el8 |
| Rocky Linux:9 | gstreamer1-plugins-bad-free | 0 | 0:1.22.1-4.el9 |
| SUSE:Enterprise Storage 7.1 | gstreamer-plugins-bad | 0 | 1.16.3-150300.9.12.2 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | gstreamer-plugins-bad | 0 | 1.12.5-150000.3.15.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | gstreamer-plugins-bad | 0 | 1.16.3-150200.4.13.2 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | gstreamer-plugins-bad | 0 | 1.16.3-150300.9.12.2 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | gstreamer-plugins-bad | 0 | 1.16.3-150300.9.12.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | gstreamer-plugins-bad | 0 | 1.20.1-150400.3.9.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | gstreamer-plugins-bad | 0 | 1.22.0-150500.3.9.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | gstreamer-plugins-bad | 0 | 1.20.1-150400.3.9.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP5 | gstreamer-plugins-bad | 0 | 1.22.0-150500.3.9.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP4 | gstreamer-plugins-bad | 0 | 1.20.1-150400.3.9.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP5 | gstreamer-plugins-bad | 0 | 1.22.0-150500.3.9.1 |
| SUSE:Linux Enterprise Server 12 SP5 | gstreamer-plugins-bad | 0 | 1.8.3-18.9.3 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | gstreamer-plugins-bad | 0 | 1.12.5-150000.3.15.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | gstreamer-plugins-bad | 0 | 1.16.3-150200.4.13.2 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | gstreamer-plugins-bad | 0 | 1.16.3-150300.9.12.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | gstreamer-plugins-bad | 0 | 1.8.3-18.9.3 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | gstreamer-plugins-bad | 0 | 1.12.5-150000.3.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | gstreamer-plugins-bad | 0 | 1.16.3-150200.4.13.2 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | gstreamer-plugins-bad | 0 | 1.16.3-150300.9.12.2 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | gstreamer-plugins-bad | 0 | 1.8.3-18.9.3 |
| Ubuntu:16.04:LTS | gst-plugins-bad1.0 | 0 | No fix |
| Ubuntu:18.04:LTS | gst-plugins-bad1.0 | 0 | No fix |
| Ubuntu:20.04:LTS | gst-plugins-bad1.0 | 0 | 1.16.3-0ubuntu1.1 |
| Ubuntu:22.04:LTS | gst-plugins-bad1.0 | 0 | 1.20.3-0ubuntu1.1 |
| Ubuntu:23.10 | gst-plugins-bad1.0 | 0 | 1.22.4-1ubuntu1.1 |
| Ubuntu:24.04:LTS | gst-plugins-bad1.0 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gst-plugins-bad1.0 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | gst-plugins-bad1.0 | 0 | No fix |
| openSUSE:Leap 15.4 | gstreamer-plugins-bad | 0 | 1.22.0-lp155.3.7.1 |
| openSUSE:Leap 15.5 | gstreamer-plugins-bad | 0 | 1.22.0-lp155.3.7.1 |
Related vulnerabilities
- CVE-2023-44446 GStreamer MXF File Parsing Use-After-Free Remote Code Execution Vulnerability. Also affects gstreamer1-plugins-bad-free
- CVE-2023-40475 GStreamer MXF File Parsing Integer Overflow Remote Code Execution Vulnerability. Also affects gstreamer1-plugins-bad-free
- CVE-2023-40474 GStreamer MXF File Parsing Integer Overflow Remote Code Execution Vulnerability. Also affects gstreamer1-plugins-bad-free
- CVE-2024-0444 GStreamer AV1 Video Parsing Stack-based Buffer Overflow Remote Code Execution… Also affects gstreamer1-plugins-bad-free
- CVE-2024-4453 GStreamer EXIF Metadata Parsing Integer Overflow Remote Code Execution Vulnerability. Also affects gstreamer1-plugins-bad-free
- CVE-2023-50186 GStreamer AV1 Video Parsing Stack-based Buffer Overflow Remote Code Execution… Also affects gstreamer1-plugins-bad-free
- CVE-2023-44429 GStreamer AV1 Codec Parsing Heap-based Buffer Overflow Remote Code Execution… Also affects gstreamer1-plugins-bad-free
- CVE-2023-37329 GStreamer SRT File Parsing Heap-based Buffer Overflow Remote Code Execution Vulnerability. Also affects gst-plugins-bad1.0