Skip to main content

PocketSphinx CVE-2026-54559

| EUVDEUVD-2026-78066 MEDIUM
Buffer Overflow (CWE-119)
2026-07-17 https://github.com/cmusphinx/pocketsphinx GHSA-56r5-2p2f-7cxp PYSEC-2026-3498
6.9
CVSS 4.0 · Vendor: https://github.com/cmusphinx/pocketsphinx
Share

Severity by source

Vendor (https://github.com/cmusphinx/pocketsphinx) PRIMARY
6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
7.8 HIGH

Local vector and low-privilege filesystem write access to model directory required; no user interaction once file is placed; full code execution yields High C/I/A.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
MEDIUM
qualitative

Primary rating from Vendor (https://github.com/cmusphinx/pocketsphinx).

CVSS VectorVendor: https://github.com/cmusphinx/pocketsphinx

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

4
CVSS changed
Sep 14, 2026 - 20:22 NVD
6.9 (MEDIUM)
Source Code Evidence Fetched
Jul 17, 2026 - 21:46 vuln.today
Analysis Generated
Jul 17, 2026 - 21:46 vuln.today
CVE Published
Jul 17, 2026 - 21:19 cve.org
MEDIUM

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 22 pypi packages depend on pocketsphinx (18 direct, 4 indirect)

Ecosystem-wide dependent count for version 5.1.1.

DescriptionCVE.org

Impact

The trie language model code introduced in PocketSphinx 5prealpha failed to check various boundary conditions when reading the headers of ARPA, DMP, and binary format language model files. In the case of invalid, corrupted or malicious input files, this could lead to stack and heap buffer overflows.

In addition, the acoustic model loading code (which is over 30 years old...) contains numerous instances of sscanf with an unbounded string field which could also lead to stack overflows in the case of corrupt or malicious inputs.

Because PocketSphinx will search the directory given by the POCKETSPHINX_PATH environment variable for acoustic and language model files, if this directory is writable by untrusted users, an attacker could corrupt an existing file or write a malicious one to this directory in order to trigger the vulnerability.

Patches

The problem has been corrected in PocketSphinx 5.1.1.

There is no patch currently available for users of Pocketsphinx 5prealpha, who are encouraged to migrate as soon as possible to PocketSphinx 5.1.1.

Workarounds

Ensure that the POCKETSPHINX_PATH environment variable is either unset, or set to a directory whose contents are trusted and which cannot be written by untrusted users.

AnalysisAI

Buffer overflows in PocketSphinx's language and acoustic model loading code allow an attacker with write access to the POCKETSPHINX_PATH directory to corrupt application memory when crafted or malicious model files are subsequently loaded. Affected are all PocketSphinx 5prealpha releases (no separate patch exists for this branch) and all versions prior to 5.1.1, due to missing boundary checks in ARPA, DMP, and binary format file header parsing, combined with decades-old acoustic model loading code using sscanf without field-width limits. Vendor-released patch PocketSphinx 5.1.1 resolves both code paths; publicly available exploit code is asserted by source metadata though linked references resolve to the advisory rather than standalone exploit.

Technical ContextAI

PocketSphinx (pkg:pip/pocketsphinx) is an open-source speech recognition library from Carnegie Mellon University, distributed via PyPI. The vulnerability class is CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer), manifesting as both stack and heap buffer overflows across two distinct code paths. First, the trie-based language model loader introduced in the 5prealpha release fails to validate boundary conditions while parsing headers in ARPA, DMP, and binary language model formats, enabling heap and stack corruption on malformed input. Second, the acoustic model loader - described by the maintainer as over 30 years old - uses sscanf with unbounded %s format specifiers, a classic C vulnerability enabling stack overflows when input tokens exceed the destination buffer size. The trigger relies on PocketSphinx automatically scanning the directory specified by the POCKETSPHINX_PATH environment variable for model files at load time, making that directory's write permissions the pivotal security boundary.

RemediationAI

Vendor-released patch: PocketSphinx 5.1.1. All users should upgrade immediately via pip install --upgrade pocketsphinx, targeting version 5.1.1 or later, which corrects the boundary check failures in language model parsing and the unbounded sscanf calls in acoustic model loading. The fix and changelog are documented at https://github.com/cmusphinx/pocketsphinx/releases/tag/v5.1.1. Users still on the 5prealpha branch have no patched variant available and must migrate - there is no backport. As a compensating control prior to patching, ensure the POCKETSPHINX_PATH environment variable is either unset (falling back to trusted system model paths) or explicitly set to a directory owned by the application's process user and not writable by any other account. Unsetting POCKETSPHINX_PATH may alter which model files are loaded, so verify application behavior after making this change. Restricting directory permissions eliminates the file-delivery path entirely without requiring code changes.

Vendor StatusVendor

SUSE

Severity: Moderate

Share

CVE-2026-54559 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy