CVE-2026-1260: Sentencepiece Heap Overflow Vulnerability

sentencepiece Updated 22 Jan 2026

Summary

22/01/2026
Yes i
High
8.5

CVE-2026-1260: Sentencepiece has a a heap overflow issue. Affects sentencepiece versions < 0.2.1. Fixed in 0.2.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Sentencepiece is an open-source text tokenizer and detokenizer designed for neural network-based text processing. It is widely used in natural language processing tasks due to its ability to handle various languages and its efficiency in training models. However, certain versions of Sentencepiece are susceptible to a heap overflow vulnerability when using improperly created model files, which can lead to severe security risks.

Vulnerability Detail

The vulnerability arises from an invalid memory access in Sentencepiece versions prior to 0.2.1. When a vulnerable model file, which is not created through the standard training procedure, is used, it can lead to a heap overflow. This flaw can be exploited by attackers to execute arbitrary code, potentially compromising the system's integrity and confidentiality. The technical aspect of this vulnerability is classified under CWE-119, indicating a memory corruption issue that can have serious ramifications.

How To Fix

Latest published version: 0.2.2 as of 23 Oct 2026

pip install --upgrade "sentencepiece==0.2.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.2.1

This is the first release that contains the fix.

pip install --upgrade "sentencepiece==0.2.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, avoid using model files that were not created through the standard training procedure. This can help mitigate the risk of exploitation until the package is updated.

Conclusion

In summary, the heap overflow vulnerability identified as CVE-2026-1260 in Sentencepiece poses significant risks to users of versions prior to 0.2.1. It is crucial to update to the latest version to mitigate these risks. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for sentencepiece →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 8.5, indicating a high severity level.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to arbitrary code execution, compromising system integrity and confidentiality.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities using just the Pipfile.lock.

If an immediate update is not possible, ensure that you do not use any vulnerable model files until you can upgrade to the patched version.

Related vulnerabilities

Recent vulnerabilities recorded for sentencepiece.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 0.2.2 as of 23 Oct 2026

pip install --upgrade "sentencepiece==0.2.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.2.1

This is the first release that contains the fix.

pip install --upgrade "sentencepiece==0.2.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback