Skip to content
HighVulnerability

GHSA-jfjg-vc52-wqvf: BentoML has Dockerfile Command Injection via system_packages in bentofile.yaml

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

Summary

BentoML's docker.system_packages field in bentofile.yaml accepts arbitrary strings that are interpolated unescaped into Dockerfile RUN commands. A crafted bentofile.yaml therefore executes attacker-chosen shell commands during bentoml containerize or docker build, including in CI/CD pipelines and when BentoCloud builds user-supplied configs. The flaw affects all versions supporting that field, confirmed on 1.4.36.

Mitigation

Option 1 (recommended): add a regex validator to system_packages in src/bentoml/_internal/bento/build_config.py that permits only alphanumeric characters, dots, plus signs, hyphens, underscores and colons in package names. Option 2: apply shlex.quote() to each package name before interpolation in images.py:system_packages() and apply the bash_quote Jinja2 filter in base_debian.j2.