{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-139989",
        "assignerOrgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
        "state": "PUBLISHED",
        "assignerShortName": "VulnCheck",
        "dateReserved": "2026-11-30T17:28:45.343Z",
        "datePublished": "2026-11-30T18:26:34.358Z",
        "dateUpdated": "2026-11-30T18:26:34.358Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
                "shortName": "VulnCheck",
                "dateUpdated": "2026-11-30T18:26:34.358Z"
            },
            "datePublic": "2026-11-30T00:00:00.000Z",
            "title": "Languagemodels 1.0.0 Jinja2 Template Injection RCE via Config.use_hf_model",
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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."
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "description": "Improper Neutralization of Special Elements Used in a Template Engine",
                            "cweId": "CWE-1336",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "vendor": "jncraton",
                    "product": "languagemodels",
                    "defaultStatus": "unaffected",
                    "versions": [
                        {
                            "version": "1.0.0",
                            "lessThan": "1.0.1",
                            "versionType": "semver",
                            "status": "affected"
                        }
                    ],
                    "packageURL": "pkg:pypi/languagemodels",
                    "repo": "https://github.com/jncraton/languagemodels"
                }
            ],
            "metrics": [
                {
                    "format": "CVSS",
                    "cvssV4_0": {
                        "version": "4.0",
                        "vectorString": "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",
                        "attackVector": "LOCAL",
                        "attackComplexity": "LOW",
                        "attackRequirements": "NONE",
                        "privilegesRequired": "NONE",
                        "userInteraction": "PASSIVE",
                        "vulnConfidentialityImpact": "HIGH",
                        "vulnIntegrityImpact": "HIGH",
                        "vulnAvailabilityImpact": "HIGH",
                        "subConfidentialityImpact": "NONE",
                        "subIntegrityImpact": "NONE",
                        "subAvailabilityImpact": "NONE",
                        "baseScore": 8.5,
                        "baseSeverity": "HIGH"
                    }
                },
                {
                    "format": "CVSS",
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
                        "attackVector": "LOCAL",
                        "attackComplexity": "LOW",
                        "privilegesRequired": "NONE",
                        "userInteraction": "REQUIRED",
                        "scope": "UNCHANGED",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "HIGH",
                        "availabilityImpact": "HIGH",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    }
                }
            ],
            "references": [
                {
                    "url": "https://github.com/jncraton/languagemodels/issues/43",
                    "tags": [
                        "issue-tracking"
                    ]
                },
                {
                    "url": "https://github.com/jncraton/languagemodels/pull/44",
                    "tags": [
                        "issue-tracking",
                        "patch"
                    ]
                },
                {
                    "url": "https://github.com/jncraton/languagemodels/commit/48f4257a0d20a82075d2847a51036a3c8a2a0a13",
                    "tags": [
                        "patch"
                    ]
                },
                {
                    "url": "https://pypi.org/project/languagemodels/1.0.1/",
                    "tags": [
                        "product"
                    ]
                },
                {
                    "url": "https://github.com/jncraton/languagemodels/blob/a875090e2b74257e44bd0a534f42704a1014d61c/languagemodels/config.py#L366-L380",
                    "tags": [
                        "technical-description"
                    ]
                },
                {
                    "url": "https://www.vulncheck.com/advisories/languagemodels-1.0.0-jinja2-template-injection-rce-via-config-use-hf-model",
                    "name": "VulnCheck Advisory: Languagemodels 1.0.0 Jinja2 Template Injection RCE via Config.use_hf_model",
                    "tags": [
                        "third-party-advisory"
                    ]
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "Dilanka Kaushal Hewage (r3vpwnx)",
                    "type": "finder"
                }
            ],
            "x_generator": {
                "engine": "vulncheck-endgame"
            }
        }
    }
}