{"id":"CVE-2026-85670","published":"2026-09-04T14:32:25Z","modified":"2026-09-04T17:49:42Z","title":"tokenizers BpeBuilder Buffer Overflow via merge token","vendor":"huggingface","product":"tokenizers","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00467,"percentile":0.41348,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/huggingface/tokenizers/issues/2094","tags":["issue-tracking"]},{"url":"https://github.com/huggingface/tokenizers","tags":["product"]},{"url":"https://github.com/huggingface/tokenizers/blob/v0.23.2/tokenizers/src/models/bpe/model.rs","tags":["technical-description"]},{"url":"https://www.vulncheck.com/advisories/tokenizers-bpebuilder-buffer-overflow-via-merge-token","tags":["third-party-advisory"]}],"priority":{"score":12.8,"factors":[{"name":"EPSS percentile","points":8.27},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"huggingface","affectedVersions":[{"vendor":"huggingface","product":"tokenizers","versions":["<= 0.23.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-09-04T17:49:21.636135Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-71126","exploited":false,"provenance":"source"}}