CVE-2026-139989
7.8HighPublished Nov 30, 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite
High
0CVSS v3.110
- Attack vector
- Local
- Complexity
- Low
- Privileges
- None
- User action
- Required
- Impact
- Full C/I/A compromise
- Weakness
- CWE-1336
What an attacker gets
Attackers can execute arbitrary code with the privileges of the process using the library. This requires a user to load a malicious Hugging Face model containing a crafted chat_template.
Root cause
The library uses an unsandboxed Jinja2 environment to process chat templates, allowing access to the os module.
Affected versions
Languagemodels 1.0.0
CVSS v3.1 · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Fix & remediation
Upgrade to Languagemodels 1.0.1. If you cannot update, avoid using Config.use_hf_model with untrusted model repositories.
$ pip install --upgrade languagemodelsAI-suggested. Run it in staging first and check it against the vendor advisory. Why?
NVD 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.
References
- https://github.com/jncraton/languagemodels/blob/a875090e2b74257e44bd0a534f42704a1014d61c/languagemodels/config.py#L366-L380
- https://github.com/jncraton/languagemodels/commit/48f4257a0d20a82075d2847a51036a3c8a2a0a13
- https://github.com/jncraton/languagemodels/issues/43
- https://github.com/jncraton/languagemodels/pull/44
- https://pypi.org/project/languagemodels/1.0.1/
- https://www.vulncheck.com/advisories/languagemodels-1.0.0-jinja2-template-injection-rce-via-config-use-hf-model
Related Critical / High CVEs
More fully triaged vulnerabilities you may want to check next.
- CVE-2026-1399907.5HighUnauthenticated attackers can extract database contents via time-based blind SQL injection. They only need network access to the GLPI web interface.
- CVE-2026-1398177.3HighRemote attackers can trigger an out-of-bounds write by manipulating the max_seqlen_k argument. This can lead to memory corruption or arbitrary code execution.
- CVE-2026-1371899.3CriticalUnauthenticated remote attackers can bypass access controls to modify Jupyter backend configurations or access health endpoints. This is possible because the server trusts the client-supplied Host header to verify request origin.
- CVE-2026-1371868.7HighAuthenticated attackers can execute arbitrary OS commands on the host. This occurs during the installation of a STDIO MCP server before sandboxing is applied.
- CVE-2026-1371857.3HighAttackers can execute arbitrary code outside the project root as the process user. This requires the attacker to influence a model-issued command and, in default mode, requires human approval.
- CVE-2026-1371847.8HighLocal attackers can steal plaintext WinRM credentials from process command lines or telemetry logs. This occurs when the winrm_exec tool is used with explicit credentials.