CVE-2026-85670

Source
https://cve.org/CVERecord?id=CVE-2026-85670
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-85670.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-85670
Published
2026-09-04T14:32:25.391Z
Modified
2026-09-06T03:47:20.256899663Z
Severity
  • 7.1 (High) CVSS_V4 - 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 CVSS Calculator
Summary
tokenizers BpeBuilder Buffer Overflow via merge token
Details

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::fromfile/fromstr, 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 continuingsubwordprefix is set and a merge token is shorter than the prefix. Observed in version 0.23.1.

Database specific
{
    "cwe_ids": [
        "CWE-787"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/85xxx/CVE-2026-85670.json",
    "cna_assigner": "VulnCheck"
}
References

Affected packages

Git / github.com/huggingface/tokenizers

Affected ranges

Type
GIT
Repo
https://github.com/huggingface/tokenizers
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Database specific
Show details
{
    "source": "AFFECTED_FIELD",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "0.23.2"
        }
    ]
}

Affected versions

node-v0.*
node-v0.12.0
node-v0.13.0
node-v0.13.2
node-v0.13.3
node-v0.2.3
node-v0.2.4
node-v0.3.0
node-v0.3.1
node-v0.4.0
node-v0.4.1
node-v0.5.0
node-v0.6.0
node-v0.6.1
node-v0.6.2
node-v0.7.0
node-v0.8.0
node-v0.8.1
node-v0.8.2
node-v0.8.3
python-v0.*
python-v0.10.0
python-v0.10.0rc1
python-v0.10.1
python-v0.10.1rc1
python-v0.10.2
python-v0.10.3
python-v0.11.0
python-v0.11.1
python-v0.11.2
python-v0.11.3
python-v0.11.4
python-v0.11.5
python-v0.11.6
python-v0.12.0
python-v0.12.1
python-v0.13.0
python-v0.13.2
python-v0.13.3
python-v0.13.3rc1
python-v0.2.0
python-v0.2.1
python-v0.3.0
python-v0.4.0
python-v0.4.1
python-v0.4.2
python-v0.5.0
python-v0.5.1
python-v0.5.2
python-v0.6.0
python-v0.7.0
python-v0.7.0-rc1
python-v0.7.0-rc2
python-v0.7.0-rc3
python-v0.7.0-rc4
python-v0.7.0-rc5
python-v0.7.0-rc6
python-v0.7.0-rc7
python-v0.8.0
python-v0.8.0-dev
python-v0.8.0-dev1
python-v0.8.0-dev2
python-v0.8.0-rc1
python-v0.8.0-rc2
python-v0.8.0-rc3
python-v0.8.0-transformers
python-v0.8.1
python-v0.8.1.rc1
python-v0.8.1.rc2
python-v0.9.0
python-v0.9.0.dev0
python-v0.9.0.dev4
python-v0.9.0.rc1
python-v0.9.0.rc2
python-v0.9.1
python-v0.9.2
python-v0.9.3
python-v0.9.4
rust-v0.*
rust-v0.10.0
rust-v0.10.1
rust-v0.8.0
rust-v0.9.0
v0.*
v0.0.10
v0.0.11
v0.0.12
v0.0.13
v0.0.3
v0.0.4
v0.0.5
v0.0.6
v0.0.7
v0.0.8
v0.0.9
v0.1.0
v0.1.1
v0.11.1
v0.11.2
v0.12.0
v0.13.0
v0.13.2
v0.13.3
v0.13.4-rc1
v0.13.4-rc2
v0.13.4.rc1
v0.13.4.rc2
v0.15.1.rc0
v0.15.1rc0
v0.21.3
v0.23.2
v0.23.2rc0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-85670.json"