CVE-2025-3887 GStreamer H265 Codec Parsing Stack-based Buffer Overflow Remote Code Execution Vulnerability

High 8.8 Published Updated

Remote attackers can execute arbitrary code via a stack-based buffer overflow in GStreamer's H265 codec parsing.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-3887?

CVE-2025-3887 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 22 May 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-787, CWE-121

Which versions are affected by CVE-2025-3887?

It affects 2 products.

Linux distribution packages (40)
gstreamer1-plugins-bad-free AlmaLinux:10All versions1.24.11-2.el10_0
gstreamer1-plugins-bad-free-devel AlmaLinux:10All versions1.24.11-2.el10_0
gstreamer1-plugins-bad-free-libs AlmaLinux:10All versions1.24.11-2.el10_0
gstreamer1-plugins-bad-free AlmaLinux:8All versions1.16.1-5.el8_10
gstreamer1-plugins-bad-free-devel AlmaLinux:8All versions1.16.1-5.el8_10
gstreamer1-plugins-bad-free AlmaLinux:9All versions1.22.12-4.el9_6
gstreamer1-plugins-bad-free-devel AlmaLinux:9All versions1.22.12-4.el9_6
gstreamer1-plugins-bad-free-libs AlmaLinux:9All versions1.22.12-4.el9_6
gstreamer1-plugins-bad-free Red Hat:enterprise_linux:10.0All versions0:1.24.11-2.el10_0
gstreamer1-plugins-bad-free-debuginfo Red Hat:enterprise_linux:10.0All versions0:1.24.11-2.el10_0
gstreamer1-plugins-bad-free-debugsource Red Hat:enterprise_linux:10.0All versions0:1.24.11-2.el10_0
gstreamer1-plugins-bad-free-devel Red Hat:enterprise_linux:10.0All versions0:1.24.11-2.el10_0
gstreamer1-plugins-bad-free-libs Red Hat:enterprise_linux:10.0All versions0:1.24.11-2.el10_0
gstreamer1-plugins-bad-free-libs-debuginfo Red Hat:enterprise_linux:10.0All versions0:1.24.11-2.el10_0
gstreamer1-plugins-bad-free Red Hat:enterprise_linux:8::appstreamAll versions0:1.16.1-5.el8_10
gstreamer1-plugins-bad-free-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:1.16.1-5.el8_10
gstreamer1-plugins-bad-free-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:1.16.1-5.el8_10
gstreamer1-plugins-bad-free-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:1.16.1-5.el8_10
gstreamer1-plugins-bad-free-debugsource Red Hat:enterprise_linux:8::crbAll versions0:1.16.1-5.el8_10
gstreamer1-plugins-bad-free-devel Red Hat:enterprise_linux:8::crbAll versions0:1.16.1-5.el8_10
gstreamer1-plugins-bad-free Red Hat:enterprise_linux:9::appstreamAll versions0:1.22.12-4.el9_6
gstreamer1-plugins-bad-free-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:1.22.12-4.el9_6
gstreamer1-plugins-bad-free-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:1.22.12-4.el9_6
gstreamer1-plugins-bad-free-libs Red Hat:enterprise_linux:9::appstreamAll versions0:1.22.12-4.el9_6
gstreamer1-plugins-bad-free-libs-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:1.22.12-4.el9_6
gstreamer1-plugins-bad-free-debuginfo Red Hat:enterprise_linux:9::crbAll versions0:1.22.12-4.el9_6
gstreamer1-plugins-bad-free-debugsource Red Hat:enterprise_linux:9::crbAll versions0:1.22.12-4.el9_6
gstreamer1-plugins-bad-free-devel Red Hat:enterprise_linux:9::crbAll versions0:1.22.12-4.el9_6
gstreamer1-plugins-bad-free-libs-debuginfo Red Hat:enterprise_linux:9::crbAll versions0:1.22.12-4.el9_6
gstreamer1-plugins-bad-free Red Hat:rhel_aus:8.2::appstreamAll versions0:1.16.1-3.el8_2
gstreamer1-plugins-bad-free-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:1.16.1-3.el8_2
gstreamer1-plugins-bad-free-debugsource Red Hat:rhel_aus:8.2::appstreamAll versions0:1.16.1-3.el8_2
gstreamer1-plugins-bad-free Red Hat:rhel_aus:8.4::appstreamAll versions0:1.16.1-3.el8_4
gstreamer1-plugins-bad-free-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:1.16.1-3.el8_4
gstreamer1-plugins-bad-free-debugsource Red Hat:rhel_aus:8.4::appstreamAll versions0:1.16.1-3.el8_4
gstreamer1-plugins-bad-free Red Hat:rhel_aus:8.6::appstreamAll versions0:1.16.1-3.el8_6
gstreamer1-plugins-bad-free-debuginfo Red Hat:rhel_aus:8.6::appstreamAll versions0:1.16.1-3.el8_6
gstreamer1-plugins-bad-free-debugsource Red Hat:rhel_aus:8.6::appstreamAll versions0:1.16.1-3.el8_6
gstreamer1-plugins-bad-free Red Hat:rhel_e4s:8.6::appstreamAll versions0:1.16.1-3.el8_6
gstreamer1-plugins-bad-free-debuginfo Red Hat:rhel_e4s:8.6::appstreamAll versions0:1.16.1-3.el8_6

Products include Debian Debian Linux, Gstreamer Gstreamer.

How do I fix CVE-2025-3887?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-3887 being exploited?

There is no known exploitation of CVE-2025-3887 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALSA-2025:8183, ALSA-2025:8184, ALSA-2025:8201, CLSA-2025-1753729945, DEBIAN-CVE-2025-3887, DLA-4219-1 and 23 more.

Is CVE-2025-3887 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free