Languagemodels 1.0.0 Jinja2 Template Injection RCE via Config.use_hf_model
- State
- Published
- Severity
- 8.5 High
- Published
- Nov 30, 2026
- Updated
- Nov 30, 2026
- Reserved
- Nov 30, 2026
Description
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, running commands with the victim process privileges.
| Product | Versions |
|---|---|
| languagemodels jncraton | 1.0.0 to before 1.0.1 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 8.5 High | VulnCheck | |
| 3.1 | 7.8 High | VulnCheck |
Weaknesses
- CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine
References
- https://github.com/jncraton/languagemodels/issues/43Issue Tracker
- https://github.com/jncraton/languagemodels/pull/44Issue TrackerPatch
- https://github.com/jncraton/languagemodels/commit/48f4257a0d20a82075d2847a51036a3c8a2a0a13Patch
- https://pypi.org/project/languagemodels/1.0.1/Product Page
- https://github.com/jncraton/languagemodels/blob/a875090e2b74257e44bd0a534f42704a1014d61c/languagemodels/config.py#L366-L380Technical Details
- VulnCheck Advisory: Languagemodels 1.0.0 Jinja2 Template Injection RCE via Config.use_hf_modelThird-Party Advisory
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.