Skip to content
HighVulnerability

GHSA-w2pm-x38x-jp44: Dockerfile command injection via envs[*].name in bentofile.yaml (sibling fix-bypass of CVE-2026-33744 and 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

A crafted bentofile.yaml with a newline-injected envs[*].name value makes the BentoML-generated Dockerfile contain unquoted RUN directives, which execute on the build host when the victim runs bentoml containerize on the imported bento. The flaw is in base_v2.j2 lines 71-73, where env.name is interpolated without bash_quote, and it affects bentoml 1.4.38 (verified) and likely all 1.x versions with _bentoml_impl/docker.py. It is a sibling of CVE-2026-33744 and CVE-2026-35043, whose fixes covered only system_packages.

Mitigation

Apply the bash_quote filter to env.name in base_v2.j2 lines 71-73 (both the ARG and ENV lines), and validate envs[*].name at the schema level in bentoml/_internal/bento/build_config.py:BentoEnvSchema with the regex ^[A-Za-z_][A-Za-z0-9_]*$ so newline and shell-metacharacter values are rejected at config load.