{"id":"CVE-2026-35044","state":"PUBLISHED","title":"BentoML has a Server-Side Template Injection via unsandboxed Jinja2 Environment in Dockerfile generation","description":"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.","publishedAt":"2026-04-06T17:13:43.133Z","updatedAt":"2026-04-06T18:49:59.815Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["bentoml BentoML"],"affected":[{"vendor":"bentoml","product":"BentoML","versions":[{"version":"< 1.4.38","status":"affected"}]}],"references":["https://github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6"],"weaknesses":["CWE-1336"],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/35xxx/CVE-2026-35044.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-35044","state":"PUBLISHED","datePublished":"2026-04-06T17:13:43.133Z","dateUpdated":"2026-04-06T18:49:59.815Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-03-31T21:06:06.428Z"},"containers":{"cna":{"title":"BentoML has a Server-Side Template Injection via unsandboxed Jinja2 Environment in Dockerfile generation","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"bentoml","product":"BentoML","versions":[{"version":"< 1.4.38","status":"affected"}]}],"references":[{"url":"https://github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6","name":"https://github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":8.8,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1336","lang":"en","description":"CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-04-06T17:13:43.133Z"},"source":{"advisory":"GHSA-v959-cwq9-7hr6","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-04-06T18:49:50.867463Z","id":"CVE-2026-35044","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-04-06T18:49:59.815Z"}}]}}}