AI Stack Alert High CVE-2026-139989 For AI Eng, AppSec, SOC / IR AI-assisted
CVE-2026-139989: languagemodels 1.0.0 template injection in Config.use_hf_model allows code execution
languagemodels 1.0.0 contains a template injection vulnerability in Config.use_hf_model. A remote attacker who controls a Hugging Face model repository can supply a malicious chat_template in tokenizer_config.json. The template reaches the os module through an unsandboxed jinja2 environment and runs commands with the victim process privileges. The CVSS base score is 8.5.
Why it matters
Any organization loading models from Hugging Face through this library may execute attacker-chosen commands on the host. Attackers gain the privileges of the victim process, which may include access to data, credentials, or downstream systems.
Do this
- Identify systems running the languagemodels package at version 1.0.0 and inventory where Config.use_hf_model is called.
- Check the vendor or NVD record for a fixed version and upgrade once available.
- Restrict loading to trusted, pinned Hugging Face model repositories and verify model revisions before use.
- Run model-loading workloads in isolated containers with least-privilege accounts and no access to sensitive secrets.
Exploit Clock
No signals yet
- No exploitation signals yet
Signals
- NoCISA KEV
- 8.5CVSS
- NoPublic PoC
- 34/100Priority
- 70%Confidence
Evidence
“Languagemodels 1.0.0 contains a template injection vulnerability in Config.use_hf_model that allows remote attackers to execute code by supplying a malicious Hugging Face model chat_template.”
“Attackers who control a model repository can craft a chat_template in tokenizer_config.json that reaches the os module through the unsandboxed jinja2 environment”
Sources
Affected / related
languagemodels, Server-side template injection via jinja2 chat_template
Published 2026-11-30 19:17 UTC · updated 2026-11-30 20:35 UTC · AI-assisted summary, checked against quoted sources · How we score