Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-85670— tokenizers BpeBuilder Buffer Overflow via merge token

Quick assessment

Affected
huggingface tokenizers
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Hugging Face Tokenizers是Hugging Face公司的一个将文本切分为词元的高性能工具。 Hugging Face Tokenizers 0.23.2及之前版本存在缓冲区错误漏洞,该漏洞源于tokenizers/src/models/bpe/model.rs中的BpeBuilder::build存在越界缓冲区访问,加载特制的tokenizer.json时,合并规则超过最长词汇键可能导致缓冲区溢出,造成拒绝服务,特定配置下还可能发生usize下溢,导致内存损坏。

CVSS 6.5 · Medium EPSS 0.31% · P24

Possible ATT&CK Techniques 1 AI

T1201 · Password Policy Discovery

Affected Version Matrix 1

VendorProduct Version RangeStatus
huggingface tokenizers ≤ 0.23.2 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-85670

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
tokenizers BpeBuilder Buffer Overflow via merge token
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
跨界内存写
Source: CVE Program / CVE List V5
Vulnerability Title
Hugging Face Tokenizers 缓冲区错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Hugging Face Tokenizers是Hugging Face公司的一个将文本切分为词元的高性能工具。 Hugging Face Tokenizers 0.23.2及之前版本存在缓冲区错误漏洞,该漏洞源于tokenizers/src/models/bpe/model.rs中的BpeBuilder::build存在越界缓冲区访问,加载特制的tokenizer.json时,合并规则超过最长词汇键可能导致缓冲区溢出,造成拒绝服务,特定配置下还可能发生usize下溢,导致内存损坏。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
huggingface tokenizers 0 ~ 0.23.2 -

II. Public POCs for CVE-2026-85670

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-85670

登录查看更多情报信息。

Vendor Advisories for CVE-2026-85670 (1)

Mailing List Discussions for CVE-2026-85670 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-85670

No comments yet


Leave a comment