Categories
CVE-2026-40610 medium CVSS 5.5

Vulnerability in bentoml (CVE-2026-40610)

Summary

Vulnerability in bentoml (CVE-2026-40610). Confidential information can be exposed externally. Exploitable via src_file. Mitigation: upgrade to 1.4.39 or later.

Original description

The description as published by the source.

Summary

BentoML's bentoml build packaging workflow follows attacker-controlled symlinks inside the build context and copies the referenced file contents into the generated Bento artifact.

If a victim builds an untrusted repository or other attacker-supplied build context, the attacker can place a symlink such as loot.txt -> /tmp/outside-marker.txt or a link to a more sensitive local file. When bentoml build runs, BentoML dereferences the symlink and packages the target file contents into the Bento. The leaked file can then propagate further through export, push, or containerization workflows.

Details

The vulnerable code walks files under the build context and copies each matched entry into the Bento source directory:

for root, _, files in os.walk(ctx_path):
    for f in files:
        dir_path = os.path.relpath(root, ctx_path)
        path = os.path.join(dir_path, f).replace(os.sep, "/")
        if specs.includes(path):
            src_file = ctx_path.joinpath(path)
            dst_file = target_fs.joinpath(dest_path)
            shutil.copy(src_file, dst_file)

There is no validation that the resolved path of src_file remains inside ctx_path before shutil.copy dereferences the source path. As a result, a repository-controlled symlink can cross the trust boundary from attacker-controlled repository content to developer/CI host filesystem during the build process.

This is a build-time path traversal / symlink traversal issue in the pac…

Source: NIST National Vulnerability Database 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-40610 has been found in bentoml.
Attackers can target a specific entry point like src_file over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 5.5/10.
What to do: upgrade bentoml to 1.4.39 or later.
If unsure, ask your IT team or search "bentoml CVE-2026-40610" on the vendor's site.

CVE-2026-40610 (bentoml) — CWE-59 / CVSS v3 5.5
Attack vector: local / unauthenticated
Attack surface: src_file / ctx_path / shutil.copy / loot.txt
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

A vulnerability (CWE-59) exists in bentoml. Attackers reach the vulnerable code path via src_file without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of bentoml. Attack surface: src_file / ctx_path / shutil.copy / loot.txt.

🔥 Severity

Severity: Medium (CVSS 5.5/10). Confidential information can be exposed externally.

🔧 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