---
id: "CVE-2026-125174"
page: "https://infrastack.ai/live/CVE-2026-125174"
kind: "vulnerability"
aliases: ["CVE-2026-125174"]
title: "FFmpeg: crafted Hap video frame crashes decoder through NULL pointer"
severity: "medium"
cvss: 6.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ffmpeg", "libavcodec", "media-processing", "package"]
not_affected_if: ["ffmpeg-before-8.0-or-not-in-range", "no-hap-decoding"]
published_at: "2026-11-09T19:16:52+00:00"
first_seen_at: "2026-11-09T19:28:16+00:00"
updated_at: "2026-11-09T19:31:38+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125174", "first_seen_at": "2026-11-09T19:28:16+00:00"}]
exploit_sources: []
---

# FFmpeg: crafted Hap video frame crashes decoder through NULL pointer

Link for people: https://infrastack.ai/live/CVE-2026-125174 (this .md is for agents)

FFmpeg's Hap video decoder mishandles a failed memory reallocation when a frame declares an oversized chunk count, leaving a NULL table that gets written to. An attacker who supplies a crafted Hap video file can crash the application that decodes it.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the FFmpeg version with `ffmpeg -version`, or the libavcodec version your application links against.
- Look for FFmpeg or libavcodec in your dependency lists and container images.

## Fix

- FFmpeg `8.1.3` for the 8.x line
- FFmpeg `9.0.2` for the 9.x line

## Timeline

- 2026-11-09T19:28:16+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-125174

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ffmpeg-before-8.1.3-and-9-x-before-9.0.2-null-pointer-dereference-via-ff-hap-set-chunk-count
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/f8c4c6400e835bf65e8b9cc12aba9e5c4d1c818c

## From the sources

FFmpeg before 8.1.3 and 9.x before 9.0.2 contains a NULL pointer dereference vulnerability in ff_hap_set_chunk_count() in libavcodec/hap.c, where a shadowed return variable masks reallocation failures. Attackers can supply a crafted Hap video frame with an oversized chunk count so the decoder writes through a NULL chunk table, crashing the application.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
