CVE-2026-54559: CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer in cmusphinx pocketsphinx
PocketSphinx is a small speech recognizer. Prior to 5.1.1, the trie language-model loaders in src/lm/ngram_model_trie.c do not adequately validate boundary conditions in ARPA, DMP, and binary format headers, and the acoustic-model loaders in src/mdef.c and src/util/bio.c use sscanf with unbounded string fields. Loading an invalid, corrupted, or malicious language or acoustic model can therefore cause stack or heap buffer overflows and memory corruption. An attacker who can write to a directory selected by POCKETSPHINX_PATH can replace or add a model file that PocketSphinx later loads; users of PocketSphinx 5prealpha have no backported patch and must migrate to the fixed release. This issue is fixed in version 5.1.1.
AI Analysis
Technical Summary
PocketSphinx versions before 5.1.1 contain multiple memory safety issues due to inadequate validation of boundary conditions in trie language-model loaders (src/lm/ngram_model_trie.c) and unsafe use of sscanf with unbounded strings in acoustic-model loaders (src/mdef.c and src/util/bio.c). These flaws can cause stack or heap buffer overflows and memory corruption when loading invalid, corrupted, or malicious language or acoustic model files. Exploitation requires the attacker to write or replace model files in a directory controlled by the POCKETSPHINX_PATH environment variable. The issue is resolved in PocketSphinx 5.1.1.
Potential Impact
Successful exploitation can lead to memory corruption through buffer overflows, potentially causing application crashes or arbitrary code execution. The vulnerability requires no privileges or user interaction but does require the attacker to have write access to the directory from which PocketSphinx loads model files. This could allow remote or local attackers to execute arbitrary code or cause denial of service.
Mitigation Recommendations
This vulnerability is fixed in PocketSphinx version 5.1.1. Users should upgrade to version 5.1.1 or later to remediate this issue. There is no indication of any temporary or partial mitigations; therefore, upgrading is the recommended action.
CVE-2026-54559: CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer in cmusphinx pocketsphinx
Description
PocketSphinx is a small speech recognizer. Prior to 5.1.1, the trie language-model loaders in src/lm/ngram_model_trie.c do not adequately validate boundary conditions in ARPA, DMP, and binary format headers, and the acoustic-model loaders in src/mdef.c and src/util/bio.c use sscanf with unbounded string fields. Loading an invalid, corrupted, or malicious language or acoustic model can therefore cause stack or heap buffer overflows and memory corruption. An attacker who can write to a directory selected by POCKETSPHINX_PATH can replace or add a model file that PocketSphinx later loads; users of PocketSphinx 5prealpha have no backported patch and must migrate to the fixed release. This issue is fixed in version 5.1.1.
CVSS v4.0
Score 6.9medium
Affected software
cmusphinx
pocketsphinx
pkg:github/cmusphinx/pocketsphinxRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
PocketSphinx versions before 5.1.1 contain multiple memory safety issues due to inadequate validation of boundary conditions in trie language-model loaders (src/lm/ngram_model_trie.c) and unsafe use of sscanf with unbounded strings in acoustic-model loaders (src/mdef.c and src/util/bio.c). These flaws can cause stack or heap buffer overflows and memory corruption when loading invalid, corrupted, or malicious language or acoustic model files. Exploitation requires the attacker to write or replace model files in a directory controlled by the POCKETSPHINX_PATH environment variable. The issue is resolved in PocketSphinx 5.1.1.
Potential Impact
Successful exploitation can lead to memory corruption through buffer overflows, potentially causing application crashes or arbitrary code execution. The vulnerability requires no privileges or user interaction but does require the attacker to have write access to the directory from which PocketSphinx loads model files. This could allow remote or local attackers to execute arbitrary code or cause denial of service.
Mitigation Recommendations
This vulnerability is fixed in PocketSphinx version 5.1.1. Users should upgrade to version 5.1.1 or later to remediate this issue. There is no indication of any temporary or partial mitigations; therefore, upgrading is the recommended action.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-15T19:04:14.457Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aa8567355bf5e2cf58d7f06
Added to database: 09/14/2026, 20:17:55 UTC
Last enriched: 09/14/2026, 20:32:14 UTC
Last updated: 09/15/2026, 01:16:51 UTC
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.