已关闭
CVE-2026-85670 #328
opengauss_bot创建于  13 天前关闭于  4 天前
opengauss_bot
opengauss_bot成员
13 天前 创建

一、漏洞信息
漏洞编号:CVE-2026-85670
漏洞归属组件:tokenizers, https://gitcode.com/opengauss/openGauss-third_party
漏洞归属的版本:0.21.2
CVSS分值:
 BaseScore: N/A None
 Vector: N/A

漏洞简述:
A vulnerability, which was classified as problematic, has been found in Hugging Face tokenizers up to 0.23.2. This issue affects the function BpeBuilder::build of the file tokenizers/src/models/bpe/model.rs of the component BpeBuilder. There is no information about possible countermeasures known. It may be suggested to replace the affected object with an alternative product.

漏洞公开时间:2026-09-04 23:07:03
漏洞创建时间:2026-09-04 23:41:28
漏洞详情参考链接:
https://nvd.nist.gov/vuln/detail/CVE-2026-85670
漏洞补丁信息:

二、漏洞分析结构反馈
影响性分析说明:
CVE-2026-85670 影响 Hugging Face tokenizers 库 BPE 模型构建函数 BpeBuilder::build()(tokenizers/src/models/bpe/model.rs),通过 Tokenizer::from_file()/from_str() 加载 tokenizer.json 时即触发、无需执行编码,攻击者只要能提供一个精心构造的 tokenizer.json 即可让加载过程 panic,在 Rust 与 C FFI 嵌入场景下该 panic 会直接终止整个宿主进程造成拒绝服务,上游至 v0.23.2 仍未发布修复版本,修复 PR huggingface/tokenizers#2104 尚处于 open 状态;openGauss-third_party master 与 7.0.0 分支均在 dependency/tokenizers 中以 tokenizers-0.21.2.tar.gz 引入 tokenizers 0.21.2,dependency/tokenizers/build.sh 通过 cargo build --release 将其编译为供 openGauss 内核调用的 C FFI 动态库 libtokenizers.so,对外暴露 tokenizer_from_file()/tokenizer_from_str() 等接口,构建配置保证该组件启用,经对 0.21.2 源码审阅与实际构造样本实测,漏洞描述中的主缺陷(按最长词表键预分配临时缓冲区后写入拼接合并项导致越界)在 0.21.2 中并不存在,0.21.2 仍使用 format!() 拼接合并项,构造超长合并项时正常返回 MergeTokenOutOfVocabulary 错误,但漏洞描述中的次级缺陷在 0.21.2 中真实存在,当 tokenizer.json 设置 continuing_subword_prefix 且某条合并规则的第二个 token 长度小于该前缀(或前缀边界落在多字节字符内部)时,model.rs 第 186 行的切片 &b[prefix_len..] 会以 byte index out of bounds panic,通过 libtokenizers.so 的 C 接口加载时会导致调用进程异常终止,因此 master 与 7.0.0 受该漏洞影响,修复方式为在 dependency/tokenizers 新增 CVE-2026-85670.patch(参照上游 PR #2104 适配 0.21.2,以 str::get() 替代直接切片并复用既有 MergeTokenOutOfVocabulary 错误路径,同时引入上游两个回归测试)并在 build.sh 解压源码后以 patch -p1 应用,经 cargo test 与通过 tokenizer_from_str() C 接口加载构造样本实测,修复后加载失败仅返回错误信息且进程正常存活,master 与 7.0.0 补丁内容一致;6.0.0 分支未引入 dependency/tokenizers 及 tokenizers 组件,不受影响。

漏洞评分(openGauss评分):
 BaseScore: 6.5
 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

受影响版本排查(受影响/不受影响):
1.master:受影响

likedislike
opengauss_botopengauss_bot成员
13 天前 添加了label:CVE/UNFIXED
opengauss_bot
opengauss_bot成员
13 天前 评论:

issue处理注意事项:
1. 当前issue受影响的分支提交pr时, 须在pr描述中填写当前issue编号进行关联, 否则无法关闭当前issue;
2. 模板内容需要填写完整, 无论是受影响或者不受影响都需要填写完整内容,未引入的分支不需要填写, 否则无法关闭当前issue;
3. 以下为模板中需要填写完整的内容, 请复制到评论区回复, 注: 内容的标题名称(影响性分析说明, opengauss评分, 受影响版本排查(受影响/不受影响))不能省略,省略后cve-manager将无法正常解析填写内容.


影响性分析说明:

漏洞评分(opengauss评分):
BaseScore: x.x(浮点格式)
Vector:

受影响版本排查(受影响/不受影响):
1.master:


likedislike
opengauss_bot
opengauss_bot成员
13 天前 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
13 天前 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
13 天前 添加了label:sig/StorageEngine
opengauss_bot
opengauss_bot成员
13 天前 评论:

Welcome To openGauss Community

Hey @opengauss_bot , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: StorageEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @libiao2024, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zjh_hw .

likedislike
liuzhen001liuzhen001成员
9 天前 关联了看板:openGauss 7.0.0-LTS
chendong76chendong76成员
8 天前 将 lin-qiang123 设为负责人,移除负责人 TestManager
lin-qiang123lin-qiang123成员
8 天前 关联了pull request:fix CVE-2026-80230 CVE-2026-82209 CVE-2026-85670
lin-qiang123lin-qiang123成员
8 天前 关联了pull request:fix CVE-2026-80230 CVE-2026-82209 CVE-2026-85670
opengauss_bot
opengauss_bot成员
8 天前 评论:

经过cve-manager解析,已分析的内容如下表所示:

状态 分析项目 内容
已分析 影响性分析说明 CVE-2026-85670 影响 Hugging Face tokenizers 库 BPE 模型构建函数 BpeBuilder::build()(tokenizers/src/models/bpe/model.rs),通过 Tokenizer::from_file()/from_str() 加载 tokenizer.json 时即触发、无需执行编码,攻击者只要能提供一个精心构造的 tokenizer.json 即可让加载过程 panic,在 Rust 与 C FFI 嵌入场景下该 panic 会直接终止整个宿主进程造成拒绝服务,上游至 v0.23.2 仍未发布修复版本,修复 PR huggingface/tokenizers#2104 尚处于 open 状态;openGauss-third_party master 分支在 dependency/tokenizers 中以 tokenizers-0.21.2.tar.gz 引入 tokenizers 0.21.2,dependency/tokenizers/build.sh 通过 cargo build --release 将其编译为供 openGauss 内核调用的 C FFI 动态库 libtokenizers.so,对外暴露 tokenizer_from_file()/tokenizer_from_str() 等接口,经对 0.21.2 源码审阅与实际构造样本实测,漏洞描述中的主缺陷(按最长词表键预分配临时缓冲区后写入拼接合并项导致越界)在 0.21.2 中并不存在,0.21.2 仍使用 format!() 拼接合并项,构造超长合并项时正常返回 MergeTokenOutOfVocabulary 错误,但漏洞描述中的次级缺陷在 0.21.2 中真实存在,当 tokenizer.json 设置 continuing_subword_prefix 且某条合并规则的第二个 token 长度小于该前缀(或前缀边界落在多字节字符内部)时,model.rs 第 186 行的切片 &b[prefix_len..] 会以 byte index out of bounds panic,通过 libtokenizers.so 的 C 接口加载时会导致调用进程异常终止,因此 master 分支受该漏洞影响,修复方式为在 dependency/tokenizers 新增 CVE-2026-85670.patch(参照上游 PR #2104 适配 0.21.2,以 str::get() 替代直接切片并复用既有 MergeTokenOutOfVocabulary 错误路径,同时引入上游两个回归测试)并在 build.sh 解压源码后以 patch -p1 应用,经 cargo test 与通过 tokenizer_from_str() C 接口加载构造样本实测,修复后加载失败仅返回错误信息且进程正常存活。
已分析 BaseScore 6.5
已分析 Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
已分析 受影响版本排查 master:受影响

请确认分析内容的准确性, 确认无误后, 您可以进行后续步骤, 否则您可以继续分析.

likedislike
opengauss_botopengauss_bot成员
8 天前 修改了issue 的描述
lin-qiang123
lin-qiang123成员
8 天前 评论:

影响性分析说明:
CVE-2026-85670 影响 Hugging Face tokenizers 库 BPE 模型构建函数 BpeBuilder::build()(tokenizers/src/models/bpe/model.rs),通过 Tokenizer::from_file()/from_str() 加载 tokenizer.json 时即触发、无需执行编码,攻击者只要能提供一个精心构造的 tokenizer.json 即可让加载过程 panic,在 Rust 与 C FFI 嵌入场景下该 panic 会直接终止整个宿主进程造成拒绝服务,上游至 v0.23.2 仍未发布修复版本,修复 PR huggingface/tokenizers#2104 尚处于 open 状态;openGauss-third_party master 与 7.0.0 分支均在 dependency/tokenizers 中以 tokenizers-0.21.2.tar.gz 引入 tokenizers 0.21.2,dependency/tokenizers/build.sh 通过 cargo build --release 将其编译为供 openGauss 内核调用的 C FFI 动态库 libtokenizers.so,对外暴露 tokenizer_from_file()/tokenizer_from_str() 等接口,构建配置保证该组件启用,经对 0.21.2 源码审阅与实际构造样本实测,漏洞描述中的主缺陷(按最长词表键预分配临时缓冲区后写入拼接合并项导致越界)在 0.21.2 中并不存在,0.21.2 仍使用 format!() 拼接合并项,构造超长合并项时正常返回 MergeTokenOutOfVocabulary 错误,但漏洞描述中的次级缺陷在 0.21.2 中真实存在,当 tokenizer.json 设置 continuing_subword_prefix 且某条合并规则的第二个 token 长度小于该前缀(或前缀边界落在多字节字符内部)时,model.rs 第 186 行的切片 &b[prefix_len..] 会以 byte index out of bounds panic,通过 libtokenizers.so 的 C 接口加载时会导致调用进程异常终止,因此 master 与 7.0.0 受该漏洞影响,修复方式为在 dependency/tokenizers 新增 CVE-2026-85670.patch(参照上游 PR #2104 适配 0.21.2,以 str::get() 替代直接切片并复用既有 MergeTokenOutOfVocabulary 错误路径,同时引入上游两个回归测试)并在 build.sh 解压源码后以 patch -p1 应用,经 cargo test 与通过 tokenizer_from_str() C 接口加载构造样本实测,修复后加载失败仅返回错误信息且进程正常存活,master 与 7.0.0 补丁内容一致;6.0.0 分支未引入 dependency/tokenizers 及 tokenizers 组件,不受影响。

漏洞评分(opengauss评分):
BaseScore: 6.5
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

受影响版本排查(受影响/不受影响):
1.master:受影响
2.6.0.0:不受影响
3.7.0.0:受影响

likedislike
opengauss_bot
opengauss_bot成员
8 天前 评论:

经过cve-manager解析,已分析的内容如下表所示:

状态 分析项目 内容
已分析 影响性分析说明 CVE-2026-85670 影响 Hugging Face tokenizers 库 BPE 模型构建函数 BpeBuilder::build()(tokenizers/src/models/bpe/model.rs),通过 Tokenizer::from_file()/from_str() 加载 tokenizer.json 时即触发、无需执行编码,攻击者只要能提供一个精心构造的 tokenizer.json 即可让加载过程 panic,在 Rust 与 C FFI 嵌入场景下该 panic 会直接终止整个宿主进程造成拒绝服务,上游至 v0.23.2 仍未发布修复版本,修复 PR huggingface/tokenizers#2104 尚处于 open 状态;openGauss-third_party master 与 7.0.0 分支均在 dependency/tokenizers 中以 tokenizers-0.21.2.tar.gz 引入 tokenizers 0.21.2,dependency/tokenizers/build.sh 通过 cargo build --release 将其编译为供 openGauss 内核调用的 C FFI 动态库 libtokenizers.so,对外暴露 tokenizer_from_file()/tokenizer_from_str() 等接口,构建配置保证该组件启用,经对 0.21.2 源码审阅与实际构造样本实测,漏洞描述中的主缺陷(按最长词表键预分配临时缓冲区后写入拼接合并项导致越界)在 0.21.2 中并不存在,0.21.2 仍使用 format!() 拼接合并项,构造超长合并项时正常返回 MergeTokenOutOfVocabulary 错误,但漏洞描述中的次级缺陷在 0.21.2 中真实存在,当 tokenizer.json 设置 continuing_subword_prefix 且某条合并规则的第二个 token 长度小于该前缀(或前缀边界落在多字节字符内部)时,model.rs 第 186 行的切片 &b[prefix_len..] 会以 byte index out of bounds panic,通过 libtokenizers.so 的 C 接口加载时会导致调用进程异常终止,因此 master 与 7.0.0 受该漏洞影响,修复方式为在 dependency/tokenizers 新增 CVE-2026-85670.patch(参照上游 PR #2104 适配 0.21.2,以 str::get() 替代直接切片并复用既有 MergeTokenOutOfVocabulary 错误路径,同时引入上游两个回归测试)并在 build.sh 解压源码后以 patch -p1 应用,经 cargo test 与通过 tokenizer_from_str() C 接口加载构造样本实测,修复后加载失败仅返回错误信息且进程正常存活,master 与 7.0.0 补丁内容一致;6.0.0 分支未引入 dependency/tokenizers 及 tokenizers 组件,不受影响。
已分析 BaseScore 6.5
已分析 Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
已分析 受影响版本排查 master:受影响

请确认分析内容的准确性, 确认无误后, 您可以进行后续步骤, 否则您可以继续分析.

likedislike
opengauss_botopengauss_bot成员
8 天前 修改了issue 的描述
lin-qiang123
lin-qiang123成员
6 天前 评论:

自验证版本master
image.png

likedislike
lin-qiang123lin-qiang123成员
6 天前 issue状态由 待办的 改变为 待回归
zhoucong<Okidoki>
zhoucong<Okidoki>成员
4 天前 评论:

pr已合入,问题单关闭。

likedislike
zhoucong<Okidoki>zhoucong<Okidoki>成员
4 天前 issue状态由 待回归 改变为 已验收
zhoucong<Okidoki>zhoucong<Okidoki>成员
4 天前 关闭了 issue
opengauss_botopengauss_bot成员
4 天前 删除了label:CVE/UNFIXED
opengauss_botopengauss_bot成员
4 天前 添加了label:CVE/FIXED