Skip to main content
EPSS 0.5%top 61%

CVE-2026-85670: Out-of-bounds Write in huggingface tokenizers

0
High
VulnerabilityCVE-2026-85670cvecve-2026-85670
Published: 09/04/2026 (09/04/2026, 14:32:25 UTC)
Source: CVE Database V5
Vendor/Project: huggingface
Product: tokenizers

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.

CVSS v4.0

Score 7.1high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected software

huggingface

tokenizers

Affected versions
>=0 <=0.23.2

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/07/2026, 12:02:52 UTC

Technical Analysis

The vulnerability in Hugging Face tokenizers (version 0.23.1) arises from an out-of-bounds buffer access in BpeBuilder::build during tokenizer.json loading. The scratch buffer is sized to the longest vocabulary key, but a merge rule with a concatenated token longer than this key causes a buffer overflow, leading to a Rust panic that aborts the process. Additionally, if the continuing_subword_prefix option is enabled and a merge token is shorter than this prefix, a usize underflow can occur, causing a panic in debug mode and potential memory corruption in release mode. This vulnerability can be exploited by supplying a malicious tokenizer.json file, resulting in denial of service at load time without requiring token encoding.

Potential Impact

An attacker who can supply a crafted tokenizer.json file can cause the tokenizers process to panic and abort, resulting in a denial of service. The secondary defect may lead to memory corruption in release builds, potentially causing undefined behavior or crashes. There is no indication of code execution or data leakage. No known exploits are reported in the wild.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid loading untrusted or unauthenticated tokenizer.json files to prevent denial of service. Monitor official Hugging Face channels for updates or patches addressing this vulnerability.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-09-04T13:32:36.617Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a9adb45acd9273b49bef597

Added to database: 09/04/2026, 14:52:53 UTC

Last enriched: 09/07/2026, 12:02:52 UTC

Last updated: 10/17/2026, 18:48:23 UTC

Views: 69

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses