CVE-2026-116741

Speex through 1.2.1 Out-of-Bounds Write via speex_bits_read_whole_bytes

Published Oct 26, 2026 CVSS 4.0 · 8.3 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Speex (libspeex) through version 1.2.1 contains an out‑of‑bounds write in the function speex_bits_read_whole_bytes(). When the library incorrectly truncates the length for non‑owned SpeexBits buffers, an attacker can write past the end of a buffer. This corrupts heap or stack memory and can cause application crashes or, if an attacker controls the overwritten memory, remote code execution. Based on the description, it is inferred that remote code execution is possible if the attacker can control the overwritten memory. The problem is a classic instance of the CWE‑787 class where a library performs an insecure write beyond the boundary of allocated memory.

Affected Systems

The vulnerability affects the Speex codec library from Xiph.Org, specifically all releases up to and including 1.2.1. Applications that incorporate libspeex and use speex_bits_init_buffer() or speex_bits_set_bit_buffer() for non‑owned buffers are at risk.

Risk and Exploitability

The vulnerability has a CVSS score of 8.3, indicating high severity. No EPSS score is available, so the likelihood of exploitation is currently unknown. It is not listed in the CISA KEV catalog. Based on the description, it is inferred that attackers would need the ability to supply crafted Speex data to a vulnerable process, which can be done over a network stream or other input channel. The flaw can be triggered by an attacker who can influence the input stream, potentially leading to memory corruption and application crashes or privilege escalation if the attacker can control overwritten memory. Existing systems that stream Speex audio directly to libspeex without additional validation remain in scope.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Speex to a patched version (e.g., 1.2.2 or later) and rebuild any dependent applications to remove the vulnerability.
  • If an upgrade cannot be performed immediately, avoid using speex_bits_init_buffer() or speex_bits_set_bit_buffer() on data that originates from untrusted sources, and ensure buffers are properly owned and bounded before processing.
  • Implement defensive input validation by checking the length of incoming Speex data and verifying buffer bounds before feeding it to the library, or use an updated API that enforces bounds checking.

Generated by OpenCVE AI on October 27, 2026 at 08:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
References
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Speex through 1.2.1 Out-of-Bounds Write via speex_bits_read_whole_bytes
First Time appeared Xiph
Xiph speex
Weaknesses CWE-787
CPEs cpe:2.3:a:xiph:speex:*:*:*:*:*:*:*:*
Vendors & Products Xiph
Xiph speex
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H'}

cvssV4_0

{'score': 8.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 2, 2026, 6:32 PM
Reserved
Oct 26, 2026, 8:23 PM
Status
Awaiting Analysis
Published
Oct 26, 2026, 10:16 PM
Modified
Nov 2, 2026, 7:17 PM
Severity
Moderate
Public date
Oct 26, 2026, 9:52 PM