Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify writable POCKETSPHINX_PATH directory
-
DeliveryCraft malicious model file (ARPA/DMP/binary/acoustic format)
-
ExploitWrite file to target directory
-
ExecutionApplication loads model at startup or reload
-
PersistUnbounded parse triggers stack or heap overflow
-
ImpactArbitrary code execution as application user
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, buffer size validation
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that POCKETSPHINX_PATH is set and points to a directory writable by an untrusted user or attacker-controlled process, and that the PocketSphinx application subsequently loads a language or acoustic model file from that directory. Specifically, the attacker must be able to place or overwrite an ARPA-format, DMP-format, binary language model file, or acoustic model file in the target directory before the application's model-loading routine executes. Exploitation is limited by: (1) requiring local filesystem write access to the model directory - pure remote unauthenticated exploitation is not described and is not possible absent a separate file-upload or path-traversal primitive; (2) a timing dependency in which the malicious file must be in place before the application's next model load; (3) if POCKETSPHINX_PATH is unset, set to a root-owned non-world-writable path, or the application is run in an isolated environment with no co-tenants, the attack path is entirely eliminated. Applications that dynamically load user-supplied model files from network sources face a distinct and potentially higher-risk profile not explicitly addressed in the advisory. |
| Impact | No CVSS vector or EPSS score was provided for this CVE; all metric assessments below are independently derived from the description and exploitation conditions. The attack requires local write access to the POCKETSPHINX_PATH directory, a non-trivial prerequisite that substantially limits exposure compared to a network-reachable flaw. However, in shared hosting, multi-tenant containerized environments, or developer workstations where model directories may be world-writable or accessible to co-located processes, this condition can realistically be met. CWE-119 buffer overflows that corrupt both stack and heap carry high code execution potential, elevating severity when exploitation conditions are met. No CISA KEV entry exists, and POC availability is ambiguous - source metadata tags two URLs as exploit references, but both resolve to the GitHub advisory page and release notes rather than functional exploit code; independent verification is recommended before treating this as weaponized. Overall real-world priority is moderate: serious for applications processing untrusted model files or running in shared-access environments, lower for isolated deployments with controlled, restricted model directories. |
| Exploit ScenarioDerived | An attacker co-located on a host with a PocketSphinx application - for example, another OS user on a developer workstation or a sibling process in a shared container - writes a crafted ARPA or binary language model file into a world-writable POCKETSPHINX_PATH directory. When PocketSphinx next loads its models, the malformed file header triggers a heap or stack buffer overflow during parsing, potentially allowing the attacker to redirect execution and run arbitrary code under the application's identity. POC availability is claimed by source metadata, though the referenced URLs link to the advisory and release page rather than standalone exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 17, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
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.
Primary rating from Vendor (https://github.com/cmusphinx/pocketsphinx).
CVSS VectorVendor: https://github.com/cmusphinx/pocketsphinx
Lifecycle Timeline
2DescriptionCVE.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.
Blast Radius
ecosystem impact- 23 pypi packages depend on pocketsphinx (19 direct, 4 indirect)
Ecosystem-wide dependent count for version 5.1.1.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
EUVD-2026-78066
GHSA-56r5-2p2f-7cxp
NVD
CVE.org
EPSS
Exploit-DB