SentencePiece
CVE-2026-1260
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malformed SentencePiece model file
-
DeliveryDistribute via model hub or upload
-
ExploitVictim loads model in app
-
ExecutionTrigger invalid memory access in parser
-
PersistCorrupt memory / crash or execute code
-
ImpactImpact host process integrity and availability
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
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 the victim application to load a specially crafted SentencePiece model file that was NOT produced by the normal |
| Impact | Signals are mixed and should be read carefully. The vendor CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H, score 8.5) describes a local attack vector requiring passive user interaction (loading the model) with high impact to confidentiality, integrity, and availability - high severity but NOT remote-unauthenticated. EPSS is 0.00% (0th percentile), there is no CISA KEV listing, and no POC is referenced, so there is no evidence of opportunistic mass exploitation. The realistic risk is therefore a supply-chain/untrusted-artifact problem: it matters specifically where applications ingest third-party or user-uploaded tokenizer models. Note the apparent tension between PR:N (no privileges) and the requirement to deliver a crafted file plus user interaction - the effective barrier to exploitation is social/distribution (getting the victim to load a hostile model), not authentication. Red Hat shipping RHSA-2026:3782 and RHSA-2026:3713 indicates the library is redistributed inside enterprise products, which broadens exposure even though standalone deployment is niche. |
| Exploit ScenarioDerived | An attacker publishes a poisoned SentencePiece .model file to a model hub, shared repository, or sends it directly, and a developer or service loads it into an application linked against SentencePiece < 0.2.1. Loading the crafted model triggers the invalid memory access (CWE-119), crashing the process or, given the high integrity/availability impact rating, potentially enabling code execution in the application's context. No public exploit is identified at time of analysis, and the local attack vector with required user interaction means delivery relies on convincing the victim to load the malicious model. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv5 – Jun 30, 2026
Memory-corruption in Google's SentencePiece tokenizer library (all versions before 0.2.1) lets a maliciously crafted model file trigger an invalid memory access (CWE-119) when the file is loaded, potentially leading to crashes or arbitrary code execution in the host process. Exploitation requires a victim to load an attacker-supplied model that was deliberately built outside the normal training pipeline, so it is not remotely triggerable on its own. No public exploit identified at time of analysis, and EPSS is 0.00%, but the flaw was reported by Google and is patched in v0.2.1.
Earlier versions of this analysis (4)
Memory corruption in Google SentencePiece versions prior to 0.2.1 allows an attacker to trigger an out-of-bounds memory access by tricking a victim into loading a maliciously crafted model file that was not produced by the normal training procedure. SentencePiece is a widely embedded text tokenization library used across machine-learning and LLM pipelines, so successful exploitation could lead to crashes or potential code execution in any application that ingests untrusted model files. No public exploit identified at time of analysis, and EPSS exploitation probability is effectively 0%, but a vendor patch (v0.2.1) is available.
Memory corruption in Google's SentencePiece tokenization library (all versions before 0.2.1) lets an attacker trigger an invalid memory access by supplying a maliciously crafted model file that was not produced through the normal training procedure. When such a file is loaded, the out-of-bounds access (CWE-119) can corrupt memory and potentially lead to arbitrary code execution within the host process. No public exploit identified at time of analysis; EPSS is 0.00% and the issue is not in CISA KEV, but a vendor patch (v0.2.1) and Red Hat errata are available.
Memory-corruption (CWE-119, out-of-bounds access) in Google's SentencePiece tokenizer library before version 0.2.1 lets a maliciously crafted model file trigger invalid memory access when loaded by an application, with high impact to confidentiality, integrity, and availability (CVSS 4.0 8.5). The malicious model is not producible through normal training and must be supplied to the victim, so exploitation requires the application to load an attacker-controlled .model file (UI:P). There is no public exploit identified at time of analysis, EPSS is 0.00%, and the issue is not on CISA KEV, so risk is currently theoretical but the buffer-bounds flaw is patch-confirmed.
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. [CVSS 7.8 HIGH]
RemediationAI
Vendor-released patch: 0.2.1 - upgrade SentencePiece to v0.2.1 or later (https://github.com/google/sentencepiece/releases/tag/v0.2.1), and for Red Hat-based systems apply the packages from RHSA-2026:3782 and RHSA-2026:3713 rather than relying on pip alone, since the library is bundled in distro/product builds. Because exploitation depends on loading an attacker-controlled model file, the most effective compensating control where immediate patching is not possible is to treat tokenizer model files as untrusted input: only load .model files from trusted, integrity-verified sources (pin checksums/signatures of known-good models), and reject or sandbox any user-supplied or third-party-downloaded models. If your application accepts uploaded models, isolate the deserialization/tokenizer load in a low-privilege, resource-limited sandbox or separate process so a crash or memory-corruption cannot compromise the main service - the trade-off is added IPC/latency and operational complexity. Avoid loading models from model hubs or shared storage without provenance checks until upgraded.
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
SentencePiece is Google's open-source unsupervised text tokenizer/detokenizer (BPE and unigram models) embedded in many NLP and LLM pipelines to serialize and deserialize trained tokenizer models, typically via protobuf-backed .model files. The CPE cpe:2.3:a:google:sentencepiece:*:*:*:*:*:*:*:* confirms the affected component is the SentencePiece application/library itself. The root cause is CWE-119 (improper restriction of operations within the bounds of a memory buffer): when parsing a model file whose internal fields/offsets are malformed in a way the legitimate training procedure would never produce, the deserialization code performs an out-of-bounds or otherwise invalid memory access. This is a classic untrusted-deserialization buffer-handling bug rather than a flaw in tokenization logic for normal inputs.
Know when Sentencepiece gets its next vulnerability
- 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:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Trigger is loading a local malicious model file (AV:L) requiring victim action (UI:R) with no prior auth (PR:N); memory corruption yields high C/I/A within the unchanged process scope.
Primary rating from Vendor (google).
CVSS VectorVendor: google
Lifecycle Timeline
7DescriptionCVE.org
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.
Executive ViewAI
Google's SentencePiece tokenizer library (versions before 0.2.1) contains a memory-corruption flaw that could crash production NLP systems or enable code execution if malicious model files are loaded into applications. Organizations using SentencePiece for chatbots, language models, or text-processing pipelines should prioritize patching to prevent potential service disruption and code execution in production environments.
Apply vendor patch.
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.
GHSA-38vq-g6vr-w8wf
NVD
CVE.org
EPSS
VulDB
Exploit-DB