Cyber Resilience

CVE-2026-35044

Bentoml ≤ 1.4.38

Public PoC
Published
06 April 2026
Modified
10 April 2026
Patch / advisory
CVSS Score v3.1 8.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score 0.0039 32th percentile
Risk Priority 64 floored blend · peak EPSS

Summary

CVE-2026-35044 is a high-severity Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336) vulnerability in Bentoml Bentoml. Its CVSS base score is 8.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Template Injection (T1221); ranked at the 32th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as Other Platforms; in the Supply Chain and Deployment risk domain.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-35044 affects BentoML, a Python library for building online serving systems optimized for AI applications and model inference. In versions prior to 1.4.38, the generate_containerfile() function in src/bentoml/_internal/container/generate.py uses an unsandboxed jinja2.Environment with the jinja2.ext.do extension to render user-provided dockerfile_template files. This allows attacker-controlled Jinja2 template code to execute arbitrary Python code directly on the host machine. The vulnerability is rated 8.8 on the CVSS 3.1 scale (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) and is associated with CWE-1336 (Incorrect Handling of Code Blocks in Templating Engine).

An attacker can exploit this vulnerability by crafting a malicious bento archive containing a tainted dockerfile_template. A victim who imports the archive and executes the 'bentoml containerize' command triggers the rendering process, leading to arbitrary Python code execution on the host system and bypassing all container isolation. Exploitation requires user interaction, such as importing and processing the archive, but needs no privileges and can occur over the network with low complexity, potentially granting high-impact confidentiality, integrity, and availability compromises.

The BentoML security advisory at https://github.com/bentoml/BentoML/security/advisories/GHSA-v959-cwq9-7hr6 confirms the issue and states that it is fixed in version 1.4.38. Security practitioners should upgrade to BentoML 1.4.38 or later and validate bento archives from untrusted sources before processing.

EU & UK References

Vulnerability Data

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Prior to 1.4.38, the Dockerfile generation function generate_containerfile() in src/bentoml/_internal/container/generate.py uses an unsandboxed jinja2.Environment with the jinja2.ext.do extension to render user-provided dockerfile_template files.…

more

When a victim imports a malicious bento archive and runs bentoml containerize, attacker-controlled Jinja2 template code executes arbitrary Python directly on the host machine, bypassing all container isolation. This vulnerability is fixed in 1.4.38.

CWE(s)

AI Security AnalysisAI

AI Category
Other Platforms
Risk Domain
Supply Chain and Deployment
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: ai, bentoml

Related Threats

MITRE ATT&CK Enterprise Techniques

T1221 Template Injection Stealth
Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-44346Same product: Bentoml Bentoml
CVE-2026-33744Same product: Bentoml Bentoml
CVE-2026-24123Same product: Bentoml Bentoml
CVE-2026-27905Same product: Bentoml Bentoml
CVE-2026-40610Same product: Bentoml Bentoml
CVE-2025-32375Same product: Bentoml Bentoml
CVE-2025-27520Same product: Bentoml Bentoml
CVE-2025-54381Same product: Bentoml Bentoml
CVE-2026-44345Same product: Bentoml Bentoml
CVE-2026-35043Same product: Bentoml Bentoml

Affected Assets

bentoml
bentoml
≤ 1.4.38

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.2
  • V1.3.7
  • V1.3.10

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and static analysis can discover missing neutralization of template directives.

Input validation rejects or sanitizes untrusted data before it reaches the template engine, stopping injection of special syntax.

Security engineering principles require use of safe templating APIs and proper escaping of external input.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require proper input neutralization in template engines to prevent injection.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can detect template-injection flaws but does not itself implement neutralization controls.

prevents

Secure development life cycle mandates input validation and sanitization that directly prevents template-injection weaknesses.

prevents

Application security requirements explicitly call for neutralizing special elements in template engines.

prevents

Secure architecture principles reduce the likelihood of unsafe template processing but do not prescribe specific neutralization techniques.

prevents

Secure coding standards require proper escaping or sandboxing of template directives, directly mitigating CWE-1336.

References