sgl-project SGLang HuggingFace Transformer hf_transformers_utils.py get_tokenizer code injection
Summary
| CVE | CVE-2026-7669 |
|---|---|
| State | PUBLISHED |
| Assigner | VulDB |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-05-02 22:16:24 UTC |
| Updated | 2026-05-05 19:15:06 UTC |
| Description | A vulnerability was detected in sgl-project SGLang up to 0.5.9. Impacted is the function get_tokenizer of the file python/sglang/srt/utils/hf_transformers_utils.py of the component HuggingFace Transformer Handler. The manipulation of the argument trust_remote_code with the input False as part of Boolean results in code injection. The attack can be executed remotely. A high complexity level is associated with this attack. The exploitability is considered difficult. In get_tokenizer(), when the caller passes trust_remote_code=False and HuggingFace transformers v5 returns a TokenizersBackend instance (the generic fallback for tokenizer classes not in the registry), SGLang silently re-invokes AutoTokenizer.from_pretrained with trust_remote_code=True, overriding the caller's explicit security setting. A model repository containing a malicious tokenizer.py referenced via auto_map in tokenizer_config.json will execute arbitrary Python in the SGLang process during this second call. No log line or warning is emitted. The override affects all current SGLang versions because transformers==5.3.0 is pinned in pyproject.toml. Both tokenizer_mode="auto" and tokenizer_mode="slow" are affected. The exploit is now public and may be used. The vendor was contacted early about this disclosure but did not respond in any way. |
Risk And Classification
Primary CVSS: v4.0 6.3 MEDIUM from [email protected]
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS: 0.000440000 probability, percentile 0.131090000 (date 2026-05-05)
Problem Types: CWE-74 | CWE-94 | CWE-94 Code Injection | CWE-74 Injection
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | [email protected] | Secondary | 6.3 | MEDIUM | CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/C... |
| 4.0 | CNA | DECLARED | 6.3 | MEDIUM | CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X |
| 3.1 | [email protected] | Secondary | 5.6 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| 3.1 | CNA | DECLARED | 5.6 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R |
| 3.0 | CNA | DECLARED | 5.6 | MEDIUM | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R |
| 2.0 | [email protected] | Secondary | 5.1 | AV:N/AC:H/Au:N/C:P/I:P/A:P | |
| 2.0 | CNA | DECLARED | 5.1 | AV:N/AC:H/Au:N/C:P/I:P/A:P/E:POC/RL:ND/RC:UR |
CVSS v4.0 Breakdown
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS v3.1 Breakdown
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
CVSS v3.0 Breakdown
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Sgl-project | SGLang | affected 0.5.0 | Not specified |
| CNA | Sgl-project | SGLang | affected 0.5.1 | Not specified |
| CNA | Sgl-project | SGLang | affected 0.5.2 | Not specified |
| CNA | Sgl-project | SGLang | affected 0.5.3 | Not specified |
| CNA | Sgl-project | SGLang | affected 0.5.4 | Not specified |
| CNA | Sgl-project | SGLang | affected 0.5.5 | Not specified |
| CNA | Sgl-project | SGLang | affected 0.5.6 | Not specified |
| CNA | Sgl-project | SGLang | affected 0.5.7 | Not specified |
| CNA | Sgl-project | SGLang | affected 0.5.8 | Not specified |
| CNA | Sgl-project | SGLang | affected 0.5.9 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| vuldb.com/submit/799263 | [email protected] | vuldb.com | |
| vuldb.com/vuln/360817 | [email protected] | vuldb.com | |
| github.com/gouldnicholas/CVE-2026-7669-PoC | [email protected] | github.com | |
| vuldb.com/vuln/360817/cti | [email protected] | vuldb.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Nicholas Gould (en)
CNA: David Rochester (en)
CNA: ngould (VulDB User) (en)
CNA: ngould (VulDB User) (en)
CNA: VulDB CNA Team (en)
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2026-04-07T02:00:00.000Z | Vulnerability found |
| CNA | 2026-04-07T02:00:00.000Z | Vendor informed |
| CNA | 2026-05-02T00:00:00.000Z | Advisory disclosed |
| CNA | 2026-05-02T02:00:00.000Z | VulDB entry created |
| CNA | 2026-05-03T02:00:00.000Z | Exploit disclosed |
| CNA | 2026-05-04T06:26:28.000Z | VulDB entry last update |