---
id: "CVE-2026-116741"
kind: "vulnerability"
aliases: ["CVE-2026-116741"]
title: "Speex: out-of-bounds write in bit reader lets crafted audio corrupt memory"
severity: "high"
cvss: 8.3
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c", "libspeex", "media-servers", "package", "voip"]
not_affected_if: ["no-untrusted-audio-input"]
published_at: "2026-10-26T22:16:58+00:00"
first_seen_at: "2026-10-26T22:25:34+00:00"
updated_at: "2026-10-26T22:27:41+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116741", "first_seen_at": "2026-10-26T22:25:34+00:00"}]
---

# Speex: out-of-bounds write in bit reader lets crafted audio corrupt memory

Speex (libspeex) through 1.2.1 has an out-of-bounds write in speex_bits_read_whole_bytes() when the bit buffer is set with speex_bits_init_buffer() or speex_bits_set_bit_buffer(). Streaming crafted Speex data can corrupt heap or stack memory and crash the application.

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

## How to check

- Check whether the application links libspeex: `pkg-config --modversion speex` or `ldd <binary> | grep speex`
- Search the codebase for `speex_bits_init_buffer` or `speex_bits_set_bit_buffer`
- Check the installed version against the sources: `speex` through `1.2.1` is affected, fixed version unknown

## Fix

- Upgrade libspeex to a release newer than `1.2.1` once a fixed version is published (unknown in the sources)
- Until then, avoid feeding untrusted Speex streams into buffers set up with speex_bits_init_buffer() or speex_bits_set_bit_buffer()

## Timeline

- 2026-10-26T22:25:34+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116741

## From the sources

Speex (libspeex) through 1.2.1 contains an out-of-bounds write vulnerability in speex_bits_read_whole_bytes() in libspeex/bits.c that mishandles length truncation for non-owned SpeexBits buffers. Attackers can stream crafted Speex data into buffers set up with speex_bits_init_buffer() or speex_bits_set_bit_buffer() to corrupt heap or stack memory and crash applications.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
