CVE-2026-35044

8.8

BentoML · BentoML

A template injection vulnerability in BentoML allows unauthenticated attackers to execute arbitrary code on the host machine during container image generation.

Executive summary

BentoML versions prior to 1.4.38 are vulnerable to remote code execution when processing malicious bento archives, posing a critical security risk to AI infrastructure.

Vulnerability

The vulnerability exists in the generate_containerfile function, which utilizes an unsandboxed Jinja2 environment to process user-provided templates. An unauthenticated attacker can supply a malicious template within a bento archive to achieve arbitrary Python code execution on the host system.

Business impact

Successful exploitation of this flaw allows an attacker to bypass container isolation and execute code directly on the host machine. Given the CVSS score of 8.8, this vulnerability represents a high risk to the confidentiality, integrity, and availability of production AI serving environments. Compromise of the host machine could lead to full system takeover, data exfiltration, or the deployment of persistent threats within the development pipeline.

Remediation

Immediate Action: Update the BentoML library to version 1.4.38 or later immediately to resolve the insecure template rendering process.

Proactive Monitoring: Review build logs and containerization workflows for suspicious bento archives or unexpected calls to the containerization utility.

Compensating Controls: Restrict the ingestion of bento archives from untrusted sources and ensure that container generation processes run with the least privilege necessary to limit potential impact.

Exploitation status

Public Exploit Available: Unknown.

Analyst recommendation

This vulnerability presents a significant risk to organizations utilizing BentoML for model deployment and inference. Security teams should prioritize the update to version 1.4.38 across all development and production environments. Failure to patch may allow attackers to escape container isolation and gain unauthorized control over the underlying host infrastructure.

More BentoML CVEs

Sources