CVE-2026-112264
7.8 HIGHpublic exploit availablePublished 2026-10-19 · Updated 2026-10-19
AI risk analysis
- Summary
- BentoML versions through 1.4.39 contain a Dockerfile instruction injection flaw in the legacy base.j2 template where newlines in docker.env mapping keys are rendered unsafely, allowing attackers to inject arbitrary RUN instructions during docker build via crafted bentofile.yaml or bento archives.
- Exploitability
- Exploitation requires local access and user interaction (e.g., triggering 'bentoml containerize' with a malicious bentofile.yaml), but is otherwise straightforward due to lack of input sanitization.
- Blast radius
- Successful exploitation allows attackers to execute arbitrary commands during image build, potentially poisoning production images, exfiltrating build secrets, and compromising downstream deployments.
- Detection
- Monitor for unexpected RUN instructions in generated Dockerfiles during 'bentoml containerize' execution; inspect build logs for lines containing newlines or concatenated commands in docker.env key rendering.
- Prioritized remediation
- Upgrade to BentoML version 1.4.40 or later, which addresses the Dockerfile instruction injection vulnerability by properly sanitizing docker.env keys in the base.j2 template.
dockerfile-injectionrcecontainer-poisoningbuild-system
Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.
NVD description
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses
CWE-78
Public exploit & PoC references
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/bento/build_config.py
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/__init__.py
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/frontend/dockerfile/templates/base.j2
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/generate.py
- https://github.com/geo-chen/oss/blob/main/BentoML.md
- https://github.com/geo-chen/oss/blob/main/BentoML.md
References
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/bento/build_config.py
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/__init__.py
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/frontend/dockerfile/templates/base.j2
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/generate.py
- https://github.com/geo-chen/oss/blob/main/BentoML.md
- https://www.vulncheck.com/advisories/bentoml-through-1.4.39-dockerfile-instruction-injection-via-docker-env-keys
- https://github.com/geo-chen/oss/blob/main/BentoML.md
Data: NVD (public domain). Analysis: local $0 model. Defensive use only.