BentoML Dockerfile Command Injection Vulnerability

Vulnerability

A command injection vulnerability has been identified in BentoML versions through 1.4.36. The issue arises in the `docker.system_packages` field of `bentofile.yaml`, which accepts arbitrary strings that are directly interpolated into Dockerfile `RUN` commands without proper sanitization. This lack of validation allows for the execution of malicious commands during the Docker build process, posing a risk of arbitrary command execution.

Impact

Exploitation of this vulnerability allows for arbitrary command execution during the Docker build process, with potential implications for CI/CD pipelines and BentoCloud users.

Reproduction

To reproduce this vulnerability, create a BentoML service and include a crafted `bentofile.yaml` that specifies malicious commands in the `docker.system_packages` field. When the project is built, the injected commands will be executed during the Docker build process.

Remediation

Users can update to BentoML version 1.4.37 or later, where this vulnerability has been fixed.

Added: Mar 27, 2026, 1:23 AM
Updated: Mar 27, 2026, 1:23 AM

Vulnerability Rating

Custom Algorithm
spread
6.2
impact
7.5
exploitability
7.6
remediation
7.7
relevance
4.5
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.