Skip to content
HighVulnerability

GHSA-78f9-r8mh-4xm2: BentoML Dockerfile command injection via docker.base_image (sister of pending GHSA-w2pm-x38x-jp44 / CVE-2026-33744 / CVE-2026-35043)

Published
Record updated
View JSON
Affected
  • bentoml <= 1.4.38
Fixed in
1.4.39
  • released May 7, 2026, 4 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.3%

Summary

GHSA-78f9-r8mh-4xm2 reports that the BentoML Dockerfile template interpolates `docker.base_image` without escaping, newline filtering, or validation. A malicious bento.yaml with a multi-line `docker.base_image` value injects extra Dockerfile directives, and `bentoml containerize` runs `docker build`, which executes the injected `RUN` directives on the victim host. The source describes this as a sister issue to pending GHSA-w2pm-x38x-jp44.

Mitigation

Suggested fix: validate `DockerOptions.base_image` at the config layer by rejecting values containing newline characters (`\n`, `\r`) or whitespace beyond a single space-separated tag, for example with the regex `^[A-Za-z0-9._/-]+(:[A-Za-z0-9._-]+)?(@sha256:[a-f0-9]{64})?$`. The source also recommends extending the same hardening to `__options__build_include[*]` at line 97 of `base_v2.j2` and to `bento__user`, `bento__uid_gid`, `bento__path`, `bento__home`, and `bento__entrypoint` if they become user-overridable through `override_bento_env`.