Skip to content
HighVulnerability

GHSA-v959-cwq9-7hr6: BentoML: SSTI via Unsandboxed Jinja2 in Dockerfile Generation

Published
Record updated
View JSON
Affected
  • bentoml <= 1.4.37
Fixed in
1.4.38
  • released April 2, 2026, 1 day before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%

Summary

BentoML's generate_containerfile() in src/bentoml/_internal/container/generate.py renders user-supplied dockerfile_template files with an unsandboxed jinja2.Environment that loads the jinja2.ext.do and jinja2.ext.debug extensions. A malicious bento archive containing a crafted template runs arbitrary Python on the host when a victim imports it and runs bentoml containerize, before any Docker container is created, bypassing container isolation.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.