GStreamer H265 slice-header stack buffer overflow enables remote code execution

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2025-3887?

CVE-2025-3887 is a vulnerability classified as Stack-based Buffer Overflow, affecting GStreamer (affected versions: 2e8b542145c1b11f8b8d927f6c679fd8028ceb60). This vulnerability is rated High, with a CVSS score of 8.8. Current sources do not report this vulnerability as exploited.

Overview

Original source data

GStreamer H265 Codec 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 slice headers. 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-26596.

Affected products and scope

  • The CNA identifies GStreamer as the affected product and marks one specific source revision as affected; its default_status is unknown. The complete revision hash is intentionally not repeated here.
  • NVD lists a GStreamer configuration from 1.0.0 through before 1.26.1 as affected. This is an NVD configuration boundary and does not by itself prove that every parallel release branch or downstream build after that boundary is safe.
  • NVD also lists a Debian Linux 11.0 configuration, but the available evidence does not provide a fixed package boundary for that branch.
  • For Debian bookworm, Debian confirms that gst-plugins-bad1.0 is fixed in 1.22.0-4+deb12u6. The status of other Debian branches and package builds is not established by the available evidence.

Technical details

GStreamer contains a CWE-121: Stack-based Buffer Overflow in parsing H.265 slice headers. Attacker-controlled data is used without adequate length validation before being copied into a fixed-length stack-based buffer. The out-of-bounds write can corrupt stack memory and allow code execution in the context of the current process. The record characterizes the attack as network-reachable, requiring no prior privileges and low complexity, but requiring a user or application to interact with the library and process crafted H.265 content. The delivery mechanism can vary according to the implementation and deployment. The available evidence does not establish the affected function, stack layout, payload, or exploit reliability.

Exploitability

The record describes a remote attack that can reach the target over a network without prior authentication or privileges. User interaction is required, meaning a user or application must cause GStreamer to process specially crafted H.265 content; the delivery channel is not specified and may vary by implementation. The attack is characterized as low complexity, but no exploit is provided in the available evidence. The supplied record marks public_exploit as false; the known-exploited and ransomware fields contain no data, so current real-world exploitation status is not established. No specific campaign, victim, payload, or IOC is identified.

Technical impact

The out-of-bounds write on the stack can corrupt memory and lead to code execution in the context of the current process. If that process can access sensitive data or functions, the executed code may affect the confidentiality and integrity of those resources. The process may also terminate or become unstable while processing specially crafted H.265 media, consistent with the denial-of-service impact described by Debian. Actual impact depends on process privileges, sandboxing, and how the application integrates GStreamer; the evidence does not establish sandbox escape or privilege escalation.

Business impact

The vulnerability can affect services, workstations, and media pipelines that process H.265 content from untrusted sources.

  • Successful exploitation can provide code execution with the privileges of the GStreamer process or embedding application.
  • Data confidentiality, processing integrity, and service availability may be affected if the process has corresponding access.
  • Debian describes malformed media as potentially causing denial of service or potentially arbitrary code execution depending on deployment conditions.
  • Actual organisational impact depends on process privileges, isolation controls, and whether the system opens or receives untrusted H.265 content.

Remediation

  1. For Debian bookworm, apply the security update that provides gst-plugins-bad1.0 version 1.22.0-4+deb12u6.
  2. For other upstream or downstream GStreamer installations, apply the vendor-provided update. ZDI confirms that GStreamer issued an update, but the available evidence does not provide one upstream fixed release covering every branch.
  3. When assessing upstream installations, use the NVD boundary as a verification signal: NVD lists versions from 1.0.0 through before 1.26.1 as affected. Confirm the fixed build separately with the vendor or maintainer for each release branch before declaring it safe.
  4. Prioritize systems that process H.265 media from untrusted sources. No specific vendor-confirmed workaround is provided in the available evidence; restricting processing of untrusted content is only a temporary risk-reduction measure and does not replace patching.

Detection

  1. Inventory systems running GStreamer and packages or plugins that parse H.265, including gst-plugins-bad1.0 on Debian.
  2. Identify applications that open media files, receive streams, or process untrusted H.265 content from networks or users.
  3. Compare installed GStreamer builds with the boundaries in affected_summary. For Debian bookworm, verify that the installed package matches the fixed package version stated in remediation.
  4. Review existing crash reports, media-processing errors, and unexpected process termination associated with H.265 content. This is precautionary monitoring because the available evidence provides no specific log event or IOC.
  5. Do not treat the absence of crashes or errors in logs as proof that a system is safe.
Sources (26)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.