Skip to content
HighVulnerability

GHSA-fgv4-6jr3-jgfw: BentoML: Command Injection in cloud deployment setup script

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.3%

Summary

BentoML's commit ce53491 added shlex.quote to fix command injection via system_packages in Dockerfile templates and images.py, but the cloud deployment path in src/bentoml/_internal/cloud/deployment.py was left out. Line 1648 of that file joins system_packages values from bentofile.yaml into an apt-get install shell command with an f-string and no quoting. The generated setup.sh is uploaded to BentoCloud and run on the cloud build infrastructure, so a malicious bentofile.yaml can execute arbitrary commands there during deployment, including during Deployment.watch() dev-mode deployments.

Mitigation

Fixed in commit ce53491 for the Dockerfile templates and images.py paths only. The cloud deployment path in src/bentoml/_internal/cloud/deployment.py, line 1648, remained unfixed in the source text. N/A -- no mitigation discussed in source. for that path.