CVE-2026-112264: BentoML: Dockerfile injection via docker.env keys
HIGHCISA: ATTENDBentoML through 1.4.39 has a Dockerfile instruction injection flaw (CWE-78): newlines embedded in docker.env mapping keys in a bentofile.yaml or imported bento archive are rendered unescaped by the legacy base.j2 template, so `bentoml containerize` runs attacker-supplied RUN instructions during docker build. The CVSS is 7.8 (local, low complexity, user interaction required), EPSS is low at 0.00218 (88th percentile), the CVE is not in CISA KEV, and no public exploit or Nuclei template exists, so near-term mass exploitation is unlikely. The real exposure is the ML supply chain: a poisoned bento shared via a model hub, a pull request or a colleague can expose build secrets and poison images that later ship to production. Downstream dependents are unknown, so scope your own usage first. Inventory BentoML use in CI/CD and developer workstations, upgrade to a fixed release once the vendor publishes one (none is confirmed in the advisory data), and until then only containerize bentofiles and bento archives from trusted sources, after reviewing docker.env keys for newlines.
What is the risk?
Medium-high. The severity is high (CVSS 7.8) with full C/I/A impact, but exploitation needs local context and user interaction, because a victim must build a malicious bentofile or bento archive. EPSS of 0.00218 and the lack of KEV listing, a public exploit and a scanner template point to low short-term exploitation likelihood. The risk concentrates in CI/CD build pipelines and shared build hosts, where build secrets, registry credentials and cloud tokens are available during docker build. Injected instructions also persist in the produced images, which creates downstream compromise risk.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| BentoML | pip | — | No patch |
Do you use BentoML? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Inventory BentoML installs (pip list, SBOMs, CI images) and identify versions <= 1.4.39. 2) Upgrade to a patched release as soon as one is available, and track the BentoML GitHub repo and the VulnCheck advisory for the fix. 3) Until patched, treat bentofile.yaml and imported bento archives as untrusted code: review them for newlines or unusual characters in docker.env keys before running
bentoml containerize. 4) Run builds in ephemeral, isolated runners with minimal secrets, using BuildKit secret mounts rather than build args or environment variables, and restrict network egress. 5) Require code review for bentofile changes and only import bentos from trusted registries. 6) Detect: scan generated Dockerfiles for unexpected RUN or other instructions, monitor build logs for unexpected network calls, and scan produced images before deployment. 7) Rotate any credentials exposed to builds of untrusted bentos.
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-112264?
BentoML through 1.4.39 has a Dockerfile instruction injection flaw (CWE-78): newlines embedded in docker.env mapping keys in a bentofile.yaml or imported bento archive are rendered unescaped by the legacy base.j2 template, so `bentoml containerize` runs attacker-supplied RUN instructions during docker build. The CVSS is 7.8 (local, low complexity, user interaction required), EPSS is low at 0.00218 (88th percentile), the CVE is not in CISA KEV, and no public exploit or Nuclei template exists, so near-term mass exploitation is unlikely. The real exposure is the ML supply chain: a poisoned bento shared via a model hub, a pull request or a colleague can expose build secrets and poison images that later ship to production. Downstream dependents are unknown, so scope your own usage first. Inventory BentoML use in CI/CD and developer workstations, upgrade to a fixed release once the vendor publishes one (none is confirmed in the advisory data), and until then only containerize bentofiles and bento archives from trusted sources, after reviewing docker.env keys for newlines.
Is CVE-2026-112264 actively exploited?
No confirmed active exploitation of CVE-2026-112264 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-112264?
1) Inventory BentoML installs (pip list, SBOMs, CI images) and identify versions <= 1.4.39. 2) Upgrade to a patched release as soon as one is available, and track the BentoML GitHub repo and the VulnCheck advisory for the fix. 3) Until patched, treat bentofile.yaml and imported bento archives as untrusted code: review them for newlines or unusual characters in docker.env keys before running `bentoml containerize`. 4) Run builds in ephemeral, isolated runners with minimal secrets, using BuildKit secret mounts rather than build args or environment variables, and restrict network egress. 5) Require code review for bentofile changes and only import bentos from trusted registries. 6) Detect: scan generated Dockerfiles for unexpected RUN or other instructions, monitor build logs for unexpected network calls, and scan produced images before deployment. 7) Rotate any credentials exposed to builds of untrusted bentos.
What systems are affected by CVE-2026-112264?
This vulnerability affects the following AI/ML architecture patterns: model serving, MLOps build and packaging pipelines, CI/CD container builds, model registries and bento sharing.
What is the CVSS score for CVE-2026-112264?
CVE-2026-112264 has a CVSS v3.1 base score of 7.8 (HIGH). The EPSS exploitation probability is 0.22%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001AI SoftwareAML.T0010.004Container RegistryAML.T0011User ExecutionAML.T0050Command and Scripting InterpreterCompliance Controls Affected
What are the technical details?
Original Advisory
BentoML through 1.4.39 contains a Dockerfile instruction injection vulnerability that allows attackers to add arbitrary build instructions by embedding newlines in docker.env mapping keys rendered by the legacy base.j2 template. Attackers can supply a crafted bentofile.yaml or imported bento archive so that bentoml containerize executes injected RUN instructions during docker build, accessing build secrets and poisoning images.
Exploitation Scenario
An attacker publishes a helpful-looking bento archive, or opens a pull request that modifies bentofile.yaml, with a docker.env key containing a newline followed by a RUN instruction. A developer or CI job runs `bentoml containerize`, and the legacy base.j2 template renders the key into the Dockerfile as a separate instruction. During docker build the injected RUN command exfiltrates registry tokens and cloud credentials available to the build and implants a backdoor in the image. The poisoned image is pushed to the registry and deployed to production model serving, giving the attacker persistent access.
Weaknesses (CWE)
CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')PrimaryCWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')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:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
- github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/bento/build_config.py
- github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/__init__.py
- github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/frontend/dockerfile/templates/base.j2
- github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/generate.py
- github.com/geo-chen/oss/blob/main/BentoML.md
- vulncheck.com/advisories/bentoml-through-1.4.39-dockerfile-instruction-injection-via-docker-env-keys
Timeline
Related Vulnerabilities
CVE-2025-543819.9BentoML: unauthenticated SSRF via file upload URLs
Same package: bentomlCVE-2025-275209.8BentoML: unauthenticated RCE via insecure deserialization
Same package: bentomlCVE-2025-323759.8BentoML: RCE via insecure deserialization in runner
Same package: bentomlCVE-2024-90709.8BentoML: unauthenticated RCE via runner deserialization
Same package: bentomlCVE-2026-350448.8BentoML: malicious bento archive RCE via Jinja2 SSTI
Same package: bentoml