# Security Advisory 2023-0008 (ZDI-CAN-21768, CVE-2023-40476)

<div class="vertical-table">

|                   |     |
| ----------------- | --- |
| Summary           | Integer overflow in H.265 video parser leading to stack overwrite |
| Date              | 2023-09-20 20:00 |
| Affected Versions | GStreamer gst-plugins-bad < 1.22.6 |
| IDs               | GStreamer-SA-2023-0008<br/>ZDI-CAN-21768<br/>CVE-2023-40476 |

</div>

## Details

Stack-based buffer overflow in the H.265 video parser when handling malformed H.265 video streams in GStreamer versions before 1.22.6

## Impact

It is possible for a malicious third party to trigger a crash in the application, and possibly also effect code execution through stack manipulation.

## Solution

The gst-plugins-bad 1.22.6 releases address the issue. People using older branches of GStreamer should apply the patch and recompile.

## References

### The GStreamer project

- [https://gstreamer.freedesktop.org](https://gstreamer.freedesktop.org)

### CVE Database Entries

- [CVE-2023-40476](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-40476)

### GStreamer 1.22.6 release

- [Release Notes](/releases/1.22/#1.22.6)  
- [GStreamer Plugins Bad 1.22.6](/src/gst-plugins-bad/gst-plugins-bad-1.22.6.tar.xz)

### Patches

- [Patches](https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5364.patch)
