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.
Severity (CVSS)
| Base score | 8.5 |
|---|---|
| Severity | High |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| Provided by | CNA |
Weaknesses
- CWE-78 — Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| bentoml | BentoML | 0 to <=1.4.39 [affected] |
References
- https://github.com/geo-chen/oss/blob/main/BentoML.md (third-party-advisory)
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/frontend/dockerfile/templates/base.j2 (technical-description)
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/bento/build_config.py (technical-description)
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/generate.py (technical-description)
- https://github.com/bentoml/BentoML/blob/v1.4.39/src/bentoml/_internal/container/__init__.py (technical-description)
- https://www.vulncheck.com/advisories/bentoml-through-1.4.39-dockerfile-instruction-injection-via-docker-env-keys (third-party-advisory)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 20 Oct 2026 07:03 UTC.