{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "48f4257a0d20a82075d2847a51036a3c8a2a0a13"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "48f4257a0d20a82075d2847a51036a3c8a2a0a13"
            }
          ],
          "repo": "https://github.com/jncraton/languagemodels",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-1336"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139989.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "range": [
              {
                "introduced": "1.0.0"
              },
              {
                "fixed": "1.0.1"
              }
            ],
            "source": "AFFECTED_FIELD",
            "strategy": "StandardRange"
          }
        ]
      }
    ]
  },
  "details": "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.",
  "id": "CVE-2026-139989",
  "modified": "2026-12-02T20:45:30.630484785Z",
  "published": "2026-11-30T18:26:34.358Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139989.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139989"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/languagemodels-1.0.0-jinja2-template-injection-rce-via-config-use-hf-model"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/jncraton/languagemodels/issues/43"
    },
    {
      "type": "FIX",
      "url": "https://github.com/jncraton/languagemodels/commit/48f4257a0d20a82075d2847a51036a3c8a2a0a13"
    },
    {
      "type": "FIX",
      "url": "https://github.com/jncraton/languagemodels/pull/44"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/jncraton/languagemodels"
    },
    {
      "type": "PACKAGE",
      "url": "https://pypi.org/project/languagemodels/1.0.1/"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/jncraton/languagemodels/blob/a875090e2b74257e44bd0a534f42704a1014d61c/languagemodels/config.py#L366-L380"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Languagemodels 1.0.0 Jinja2 Template Injection RCE via Config.use_hf_model"
}