Vulnerabilities in pkg:pypi/sentencepiece
PACKAGECVE-2026-1260 is a HIGH sentencepiece has a a heap vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Sentencepiece libraries in the PyPI ecosystem. The issue involves sentencepiece has a a heap overflow issue. Remediation is available by upgrading affected packages to version 0.2.1.
pkg:pypi/sentencepiece
Vulnerability advisories affecting package pkg:pypi/sentencepiece. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-38vq-g6vr-w8wf | CVE-2026-1260 | HIGH | Sentencepiece has a a heap overflow issue |
CVE-2026-1260 at a Glance
How to Fix CVE-2026-1260
To remediate this vulnerability, upgrade all affected Sentencepiece 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 sentencepiece>=0.2.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show sentencepiece
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-1260, inspect your installed packages using pip:
pip show sentencepiece
Analyze the terminal output to locate any version of Sentencepiece in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.1), your application is affected.
Note: The pip show sentencepiece command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Sentencepiece, 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-1260 Affected Sentencepiece Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sentencepiece
|
PyPI |
< 0.2.1
|
0.2.1
|
References
Frequently Asked Questions
What is CVE-2026-1260?
Which Sentencepiece versions are affected?
What version fixes CVE-2026-1260?
Is sentencepiece affected?
What CWE is associated with CVE-2026-1260?
How can I check PyPI dependencies for CVE-2026-1260?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-38vq-g6vr-w8wf",
"modified" : "2026-01-22T20:28:39Z",
"published" : "2026-01-22T18:30:39Z",
"aliases" : [ "CVE-2026-1260" ],
"summary" : "Sentencepiece has a a heap overflow issue",
"details" : "Invalid memory access in Sentencepiece versions less than 0.2.1 when using a vulnerable model file, which is not created in the normal training procedure.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "sentencepiece"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-1260"
}, {
"type" : "WEB",
"url" : "https://github.com/google/sentencepiece/commit/d856b67fdb3492e035489abf9b3aaf486144b2c0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/google/sentencepiece"
}, {
"type" : "WEB",
"url" : "https://github.com/google/sentencepiece/releases/tag/v0.2.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-22T20:28:39Z",
"nvd_published_at" : "2026-01-22T17:16:30Z"
}
}