CVE-2026-35044
Bentoml ≤ 1.4.38
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HSummary
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
- 🇪🇺 ENISA EUVD: EUVD-2026-19386
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
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
V1.3.2V1.3.7V1.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.
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.
Security testing can detect template-injection flaws but does not itself implement neutralization controls.
Secure development life cycle mandates input validation and sanitization that directly prevents template-injection weaknesses.
Application security requirements explicitly call for neutralizing special elements in template engines.
Secure architecture principles reduce the likelihood of unsafe template processing but do not prescribe specific neutralization techniques.
Secure coding standards require proper escaping or sandboxing of template directives, directly mitigating CWE-1336.