Read the docs

Template injection in languagemodels lets remote attackers run code

Priority MEDIUM 52CWE-1336Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-1336.

Summary

The jncraton languagemodels package from 1.0.0 before 1.0.1 has a template injection flaw in Config.use_hf_model, where a Jinja2 template is not sandboxed. A remote attacker who controls a Hugging Face model repository can supply a malicious chat_template in tokenizer_config.json, which reaches the os module and runs commands with the privileges of the victim process. The CVSS 4.0 vector rates the attack as requiring user interaction, with no privileges needed.

Written with Claude Haiku 5.5 from the sources below · 2026-11-30

Description from the CNA

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.

Why it matters now

Fix Fixed languagemodels (jncraton): 1.0.1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
jncratonlanguagemodels1.0.0 to before 1.0.11.0.1Patch availableCNA
  • languagemodels Vendorjncraton Affected 1.0.0 to before 1.0.1 Fixed in 1.0.1 Patch available CNA

Remediation

Update languagemodels to version 1.0.1, which is the fixed version. The sources list no advisory identifiers for this fix.

Written with Claude Haiku 5.5 from the sources below · 2026-11-30

  • Fix · CNA languagemodels (jncraton) Fixed in 1.0.1

Timeline

  1. 2026-11-30 Threatist record created from CVE-2026-139989
  2. 2026-11-30 Alias added: GHSA-v286-88f6-fh24

References

Sources