Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. bentoml
  4. ›
  5. CVE-2026-35044

CVE-2026-35044: BentoML: SSTI via Unsandboxed Jinja2 in Dockerfile Generation

April 3, 2026 (updated June 8, 2026)

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.

References

  • github.com/advisories/GHSA-v959-cwq9-7hr6
  • github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6
  • github.com/pypa/advisory-database/tree/main/vulns/bentoml/PYSEC-2026-159.yaml
  • nvd.nist.gov/vuln/detail/CVE-2026-35044

Code Behaviors & Features

Detect and mitigate CVE-2026-35044 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.4.38

Fixed versions

  • 1.4.38

Solution

Upgrade to version 1.4.38 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine

Source file

pypi/bentoml/CVE-2026-35044.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:53 +0000.