CVE-2026-35044
CRITICAL 9.6CVSS 3.1BentoML: SSTI via Unsandboxed Jinja2 in Dockerfile Generation
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.
- Published
- 6 Apr 2026
- Last modified
- 23 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-1336
- Also known as
- GHSA-v959-cwq9-7hr6PYSEC-2026-159
- Sources
- NVDJSONOSV GHSA-v959-cwq9-7hr6JSONOSV PYSEC-2026-159JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | CRITICAL 9.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | bentoml | bentomlcpe:2.3:a:bentoml:bentoml:*:*:*:*:*:*:*:* |
< 1.4.38 | 1.4.38 |
| OSV | PyPI | bentoml | < 1.4.38 | 1.4.38 |
References
- https://github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6 · Exploit, Vendor Advisory, WEB, EVIDENCE
- 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
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 6 Apr 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 6 Apr 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 3 Apr 2026)