CVE-2026-54559: PocketSphinx Buffer Overflows Vulnerability
MODERATECVE-2026-54559 is a MODERATE buffer overflows vulnerability (CWE-121: Stack-based Buffer Overflow) affecting PocketSphinx libraries in the PyPI ecosystem. The issue involves buffer overflows in language and acoustic model loading code. Remediation is available by upgrading affected packages to version 5.1.1.
CVE-2026-54559 at a Glance
How to Fix CVE-2026-54559
To remediate this vulnerability, upgrade all affected PocketSphinx dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pocketsphinx>=5.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pocketsphinx
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-54559, inspect your installed packages using pip:
pip show pocketsphinx
Analyze the terminal output to locate any version of PocketSphinx in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.1.1), your application is affected.
Note: The pip show pocketsphinx command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-121: Stack-based Buffer Overflow, where a stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). In PocketSphinx, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-54559 Affected PocketSphinx Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pocketsphinx
|
PyPI |
< 5.1.1
|
5.1.1
|
References
Frequently Asked Questions
What is CVE-2026-54559?
Which PocketSphinx versions are affected?
What version fixes CVE-2026-54559?
Is pocketsphinx affected?
What CWE is associated with CVE-2026-54559?
How can I check PyPI dependencies for CVE-2026-54559?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-56r5-2p2f-7cxp",
"modified" : "2026-07-17T21:19:17Z",
"published" : "2026-07-17T21:19:17Z",
"aliases" : [ "CVE-2026-54559" ],
"summary" : "PocketSphinx: Buffer overflows in language and acoustic model loading code",
"details" : "### Impact\n\nThe 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.\n\nIn 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.\n\nBecause 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.\n\n### Patches\n\nThe problem has been corrected in PocketSphinx 5.1.1.\n\nThere is no patch currently available for users of Pocketsphinx 5prealpha, who are encouraged to migrate as soon as possible to PocketSphinx 5.1.1.\n\n### Workarounds\n\nEnsure 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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pocketsphinx"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cmusphinx/pocketsphinx/security/advisories/GHSA-56r5-2p2f-7cxp"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cmusphinx/pocketsphinx"
}, {
"type" : "WEB",
"url" : "https://github.com/cmusphinx/pocketsphinx/releases/tag/v5.1.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119", "CWE-121", "CWE-122" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-17T21:19:17Z",
"nvd_published_at" : null
}
}