# CVE-2026-35044: BentoML has a Server-Side Template Injection via unsandboxed Jinja2 Environment in Dockerfile generation

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.41%, higher than 37% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-03T23:14:15.000Z
- Modified: 2026-10-23T23:10:00.157Z
- Also known as: GHSA-v959-cwq9-7hr6, PYSEC-2026-159
- Weaknesses: CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- bentoml BentoML: < 1.4.38; before 1.4.38
- bentoml (PyPI): before 1.4.38

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.6 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.6 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`

## References

- <https://github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6> (exploit, evidence, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-35044> (advisory)
- <https://github.com/bentoml/BentoML> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/bentoml/PYSEC-2026-159.yaml> (web)

## Sources

- CVE List: [CVE-2026-35044](https://www.cve.org/CVERecord?id=CVE-2026-35044), CVE Terms of Use, modified 2026-04-06
- GitHub Advisory Database: [GHSA-v959-cwq9-7hr6](https://github.com/advisories/GHSA-v959-cwq9-7hr6), CC-BY-4.0, modified 2026-06-08
- NVD: [CVE-2026-35044](https://nvd.nist.gov/vuln/detail/CVE-2026-35044), Public domain, modified 2026-10-23
- PyPA Advisory Database: [PYSEC-2026-159](https://osv.dev/vulnerability/PYSEC-2026-159), CC-BY-4.0, modified 2026-05-20

---

Page: https://cve.day/CVE-2026-35044 · Whole record: https://cve.day/CVE-2026-35044.json · Rebuilt by cve.day 2026-11-25T22:59:18.044Z
