SecurityContext

CVE-2026-35044: BentoML - Template Injection

  • Cve: CVE-2026-35044
  • Name: BentoML - Template Injection
  • 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.
  • Impact: Attackers can execute arbitrary Python code on the host, bypassing container isolation and potentially compromising the entire system.
  • Remediation: Update to version 1.4.38 or later.
  • Vulnerability type: template_injection
  • Vulnerability impact: remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.6
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Epss score: 0.00407
  • Epss percentile: 0.35526
  • Assignee: [email protected]
  • Published at: 2026-04-06T18:16:41Z
  • Age in days: 232
  • Modified at: 2026-10-23T23:10:00Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 1
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-35044
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: requirements, hackerone

Cwe

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

Public exploits

UrlSourceAdded date
https://github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6nvd2026-04-06

References

UrlSourceTags
https://github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6nvdExploit, Vendor Advisory

Products

ProductAffectedPlatform boundSourcesUrl
bentoml:bentoml< 1.4.38nonvd/v1/products/bentoml/bentoml

Projects

RepositoryLink kindsIndexedUrl
bentoml/BentoMLpackage, security_advisoryyes/v1/repositories/bentoml/BentoML

Index

  • Repositories: 2
  • Repositories high signal: 1
  • Packages: 1

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2026-04-06
  • Remote: yes
  • Exposed hosts: 66
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports