{"id":"CVE-2026-35044","published":"2026-04-06T17:13:43Z","modified":"2026-04-06T18:49:59Z","title":"BentoML has a Server-Side Template Injection via unsandboxed Jinja2 Environment in Dockerfile generation","vendor":"bentoml","product":"BentoML","tier":"tail","description":{"text":"BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Prior to 1.4.38, the Dockerfile generation function generate_containerfile() in src/bentoml/_internal/container/generate.py uses an unsandboxed jinja2.Environment with the jinja2.ext.do extension to render user-provided dockerfile_template files. When a victim imports a malicious bento archive and runs bentoml containerize, attacker-controlled Jinja2 template code executes arbitrary Python directly on the host machine, bypassing all container isolation. This vulnerability is fixed in 1.4.38.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00509,"percentile":0.36703,"provenance":"source"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"references":[{"url":"https://github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6","tags":["x_refsource_CONFIRM"]}],"priority":{"score":13.5,"factors":[{"name":"EPSS percentile","points":7.34},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"bentoml","affectedVersions":[{"vendor":"bentoml","product":"BentoML","versions":["< 1.4.38"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-04-06T18:49:50.867463Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"bentoml","vulnerableRanges":["<1.4.38"],"patched":["1.4.38"],"from":["GHSA-v959-cwq9-7hr6","PYSEC-2026-159"],"provenance":"source"}],"summary":{"text":"BentoML's Dockerfile generation function, generate_containerfile() in src/bentoml/_internal/container/generate.py, renders user-provided dockerfile_template files with an unsandboxed Jinja2 environment that includes the jinja2.ext.do extension, which allows server-side template injection. An attacker who gets a victim to import a malicious bento archive and run bentoml containerize can execute arbitrary Python code on the host machine, bypassing container isolation, and this requires user interaction (the victim must import the archive and run the command).","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:41:42Z"},"euvd":{"id":"EUVD-2026-19386","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-27905","published":"2026-03-03","fixed":"1.4.36","kev":false},{"cve":"CVE-2026-33744","published":"2026-03-27","fixed":"1.4.37","kev":false,"link":{"from":"CVE-2026-33744","to":"CVE-2026-35044","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:bentoml","fromFixed":"1.4.37","toFixed":"1.4.38","daysApart":10}]}},{"cve":"CVE-2026-35043","published":"2026-04-06","fixed":"1.4.38","kev":false},{"cve":"CVE-2026-35044","published":"2026-04-06","fixed":"1.4.38","kev":false},{"cve":"CVE-2026-40610","published":"2026-05-22","fixed":"1.4.39","kev":false},{"cve":"CVE-2026-44345","published":"2026-05-27","fixed":"1.4.39","kev":false},{"cve":"CVE-2026-44346","published":"2026-05-27","fixed":"1.4.39","kev":false}],"package":"PyPI:bentoml"}}