---
id: "CVE-2026-125228"
page: "https://infrastack.ai/live/CVE-2026-125228"
kind: "vulnerability"
aliases: ["CVE-2026-125228"]
title: "FFmpeg: NaN audio samples cause out-of-bounds heap read in Vorbis encoder"
severity: "medium"
cvss: 5.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ffmpeg", "media-processing", "package", "self-hosted"]
not_affected_if: ["no-vorbis-encoding", "trusted-input-only"]
published_at: "2026-11-09T19:17:00+00:00"
first_seen_at: "2026-11-09T19:28:19+00:00"
updated_at: "2026-11-09T19:31:57+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125228", "first_seen_at": "2026-11-09T19:28:19+00:00"}]
exploit_sources: []
---

# FFmpeg: NaN audio samples cause out-of-bounds heap read in Vorbis encoder

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

FFmpeg's native Vorbis encoder reads memory before an array when audio contains NaN float samples, because a codebook entry is left at -1. An attacker who supplies such audio can crash the application or leak adjacent heap memory into the output.

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

## How to check

- Check the FFmpeg version with `ffmpeg -version`; versions before `8.1.3` on the 8.x line, or before `9.0.2` on the 9.x line, are in the affected range.
- Find whether the encoder is used: look for the native Vorbis encoder (`libvorbis` is not this one; the native `vorbis` encoder in libavcodec) in your transcoding pipelines.

## Fix

- FFmpeg 8.x: upgrade to `8.1.3` or later.
- FFmpeg 9.x: upgrade to `9.0.2` or later.

## Timeline

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

## 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-out-of-bounds-read-in-vorbis-encoder
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/e33548ad13fd3495466a651792e8206b1c6f7fd7

## From the sources

FFmpeg before 8.1.3 and 9.x before 9.0.2 contains an out-of-bounds read vulnerability in put_vector() in libavcodec/vorbisenc.c when NaN samples leave the codebook entry at -1. Attackers can supply audio with NaN float samples to the native Vorbis encoder, causing heap reads before arrays that crash the application or leak adjacent heap memory into output.

---

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