CVE-2026-85670: Hugging Face tokenizers - Denial of Service
- Cve: CVE-2026-85670
- Name: Hugging Face tokenizers - Denial of Service
- Description: tokenizers (Hugging Face) is affected by an out-of-bounds buffer access in BpeBuilder::build (tokenizers/src/models/bpe/model.rs). When loading a tokenizer.json via Tokenizer::from_file/from_str, the builder sizes a scratch buffer to the longest vocabulary key, then writes each concatenated merge rule into it. A merge whose concatenated token exceeds the longest vocabulary key overruns the buffer, which Rust turns into a panic that aborts the process in Rust and FFI embeddings. This occurs at load time with no encoding required, so an attacker who supplies a crafted tokenizer.json can cause a denial of service. A secondary defect at the same location can cause a usize underflow (panic in debug, potential memory corruption in release) when continuing_subword_prefix is set and a merge token is shorter than the prefix. Observed in version 0.23.1.
- Impact: Attackers can cause a denial of service by crashing the process during tokenizer loading with a crafted tokenizer.json.
- Remediation: Update to the latest version of tokenizers where this issue is fixed.
- Vulnerability type: out_of_bounds_rw
- Vulnerability impact: denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 6.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- Epss score: 0.00467
- Epss percentile: 0.40982
- Assignee: [email protected]
- Published at: 2026-09-04T15:17:44Z
- Age in days: 81
- Modified at: 2026-09-24T20:28:01Z
- References total: 4
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-85670
- Nvd status: awaiting_analysis
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-787 | Out-of-bounds Write |
References
Same in every row:
- Source: nvd
- Tags:
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| huggingface/tokenizers | issues | yes | /v1/repositories/huggingface/tokenizers |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts