---
title: "CVE-2026-139989: Languagemodels - Template Injection"
description: "Languagemodels 1.0.0 contains a template injection caused by unsandboxed Jinja2 environment in Config.use_hf_model, letting remote attackers execute code by supplying malicious Hugging Face model chat_template."
url: https://panop.io/threat-heartbeat/CVE-2026-139989/
---

# CVE-2026-139989 Languagemodels - Template Injection

Languagemodels 1.0.0 contains a template injection caused by unsandboxed Jinja2 environment in Config.use\_hf\_model, letting remote attackers execute code by supplying malicious Hugging Face model chat\_template.

CVSS base score 7.8 /10

High

CISA KEV

Not listed

Public exploit

None known

Authentication

Not required

[View the NVD record ↗](https://nvd.nist.gov/vuln/detail/CVE-2026-139989)

## Details

Type

Template Injection

Impact

Remote Code Execution

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Published

30 November 2026

Updated

1 December 2026

Weakness

[CWE-1336](https://cwe.mitre.org/data/definitions/1336.html)

## Vendor fix

Update to the latest version with a fix for template injection vulnerability.

Patching closes this CVE. It does not tell you which of your systems run the affected version, or what else is exposed alongside them.

## References

- [https://nvd.nist.gov/vuln/detail/CVE-2026-139989](https://nvd.nist.gov/vuln/detail/CVE-2026-139989)
- [https://pypi.org/project/languagemodels/1.0.1/](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](https://www.vulncheck.com/advisories/languagemodels-1.0.0-jinja2-template-injection-rce-via-config-use-hf-model)
- [https://github.com/jncraton/languagemodels/blob/a875090e2b74257e44bd0a534f42704a1014d61c/languagemodels/config.py#L366-L380](https://github.com/jncraton/languagemodels/blob/a875090e2b74257e44bd0a534f42704a1014d61c/languagemodels/config.py#L366-L380)
- [https://github.com/jncraton/languagemodels/commit/48f4257a0d20a82075d2847a51036a3c8a2a0a13](https://github.com/jncraton/languagemodels/commit/48f4257a0d20a82075d2847a51036a3c8a2a0a13)
- [https://github.com/jncraton/languagemodels/issues/43](https://github.com/jncraton/languagemodels/issues/43)
- [https://github.com/jncraton/languagemodels/pull/44](https://github.com/jncraton/languagemodels/pull/44)

[← All CVEs](https://panop.io/threat-heartbeat/)

## What this record can't tell you

- Whether you run the affected software, and where
- Whether an attacker can actually reach and exploit it
- The misconfigurations that never get a CVE number
- What it would cost the business, ranked into what to fix first

Panop answers these inside your environment, for this CVE and every other finding.

[Book a demo](https://panop.io/demo)
